Ask Your Question

mayooran's profile - activity

2017-08-24 16:28:01 -0600 received badge  Student (source)
2015-11-18 23:02:10 -0600 commented question Where can I find a good age database?

But those images consist of many people in a single photo. Aren't there any you know that consist of only one person per photo.

2015-11-18 21:30:11 -0600 asked a question Where can I find a good age database?

Where can I find a good age range database? It should have images of children, middle aged people and elders. Please advice.

2015-08-08 19:47:07 -0600 asked a question Is there a way to lock onto an object in the webcam and track its movements?

I have created a a program where I identify whether there are any humans standing in front of the webcam. Is there a way where I can lock onto them and see if they have moved out of the frame? Please advice. Please provided some code sample if possible.

2015-07-25 23:30:00 -0600 asked a question How can I add opencv libraries to setup.py?

I have created an embedded Python code where a C++ function is called from Python. I have created the setup.py as following.

from distutils.core import setup,Extension

extension_mod=Extension('getGender',['getGender.cpp'],library_dirs=['/usr/local/include/opencv2/contrib','/usr/local/include/opencv2/core','/usr/local/include/opencv2/highgui','/usr/local/include/opencv2/imgproc','/usr/local/include'])

 setup(name='getGender',ext_modules=[extension_mod])

But I am getting this error.

ImportError: /usr/local/lib/python2.7/dist-packages/getGender.so: undefined symbol: _ZN2cv3Mat10deallocateEv

How can I reference these opencv libraries in my setup.py? Please advice.

2015-07-18 21:03:50 -0600 asked a question How can I compare an image to identify a person in the image?

Through webcam I'm capturing an image of the person in front. Then I display a video. After that I have to find out if its the same person standing in front. How can I do this? The possibilities in internet require many images to train an SVM. I only have one photo of the person to be recognized. How can I achieve this? Please provide with some code sample if possible as I'm new to this. I have already implemented the webcam logic. Just the image recognition I need.

2015-07-15 08:11:51 -0600 asked a question How can I classify people into different categories?

I have the need to classify people into different categories such as military man,doctor,student etc based on the images captured from a webcam. I have written the code to capture the images and I now have image/frame. How can I categorize people using Opencv. I am new to this. Please provide with some code samples if possible.

2015-07-15 08:08:11 -0600 received badge  Enthusiast
2015-07-14 08:27:51 -0600 commented answer How can I resize an image where the face should be cropped and scaled to fit the size?

Is it possible to do this without making the image gray as well?

2015-07-13 23:50:31 -0600 asked a question How can I resize an image where the face should be cropped and scaled to fit the size?

My webcam takes images. But opencv gender classification needs the images to be of the same size of that of the images used to train. So I need my webcam images to be 300300 where the face in the webcam images would fit the resolution 300300. I have identified the face in the webcam image using opencv face cascade classifiers. But how can I crop that facce to fit in the size of 300*300? Please help with some code lines.

2015-07-11 00:07:14 -0600 asked a question Why isn't opencv eye detection working properly?

I have used the below code for eye detection but it identifies eyes very inaccurately. The code I used is as follows,

import numpy as np
import cv2
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')

img = cv2.imread('sachin.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

faces = face_cascade.detectMultiScale(gray, 1.3, 5)
for (x,y,w,h) in faces:
     cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
    roi_gray = gray[y:y+h, x:x+w]
    roi_color = img[y:y+h, x:x+w]
    eyes = eye_cascade.detectMultiScale(roi_gray)
    for (ex,ey,ew,eh) in eyes:
        cv2.rectangle(roi_color,(ex,ey),(ex+ew,ey+eh),(0,255,0),2)
cv2.imshow('img',img)
cv2.waitKey(0)
cv2.destroyAllWindows()

It identifies the eyes as shown in these attached images!

C:\fakepath\Capture2.PNG

C:\fakepath\Capture.PNG

I have tried haarcascade_frontalface_alt.xml and haarcascade_eye_tree_eyeglasses.xml combination as well. I get the same output. I need the eye cordinates for further processing and since this identifies so incorrectly I am unable to proceed. Please help.

2015-07-05 05:42:51 -0600 commented question Why doesn't emotion classification work as specified?

They have been cropped using the python script available in the same link. So will adding more images to the model help? don't I need to change any configurations? And I am using the FisherFaces algorithm. Is that okay?

2015-07-05 01:08:33 -0600 asked a question Why doesn't emotion classification work as specified?

I went through the Gender classification tutorial from openCV, http://docs.opencv.org/modules/contri.... I need to do emotion classification for which they say, "If you want to do emotion classification instead of gender classification, all you need to do is to update is your training data and the configuration you pass to the demo" . I used a dataset with 16 images each for happy and sad emotions. Happy dataset includes faces of happy men,women,kids and elders. Similarly sad dataset as well. But when I tested this on 4 images all 4 went wrong. What other changes should I do apart from the dataset as said in the link by, "configurations you pass to the demo". What configurations should I change from the gender classification example facerec_fisherfaces.cpp? I am new to OpenCV. Please help.