Subscribe:

Ads 468x60px

Thursday, March 29, 2012

OpenCV Face+Nose+Mouth+Eye concurrent detection

Hi all

     This is a hobby code adapted from Opencv facedetection.cpp .It can detect more haar files now .You can add more xml according to your requirement .

I am giving the link for the source code


Some snapshots and video



26 comments:

Anonymous said...

Hey Man,

That is really cool work. I am someone who is deeply interested in computer vision and have been trying to understand the machine learning APIs in OpenCV. But unfortunately i haven't been able to wrap my head around the the haar files and training sets and get a clear process flow. Can you please point to some links or tutorials that explains this process.
Appreciated !

Thanks.

Lentin Joseph said...

Hi

Please check this link

http://www.technolabsz.com/search/label/OpenCV%20haar%20detection

anand sp said...

hai

Can you please provide me the code in java for the same

Thanks
Anand

Unknown said...
This comment has been removed by the author.
Anonymous said...

How to build the code?
I am getting error "LNK2019: unresolved external symbol _cvReleaseHaarClassifierCascade referenced in function _main".

Unknown said...

Thanks A Lot.

Ibtissem said...
This comment has been removed by the author.
Ibtissem said...
This comment has been removed by the author.
Unknown said...

how to compile the opencv progrmaes on raspberry pi using this code?

Unknown said...

when iam compiled in desktop sh opencvcmd.sh and video is run on my desktop and this is compiled but when iam run the ./video it shows the following error::
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/arun/Downloads/OpenCV-2.4.3/modules/highgui/src/window.cpp, line 602
terminate called after throwing an instance of 'cv::Exception'
what(): /home/arun/Downloads/OpenCV-2.4.3/modules/highgui/src/window.cpp:602: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow.....



Please clarify this dought.


Thanks&Regards
K.Arungopal

Unknown said...

you are run the source code in raspberry pi board or desktop?


Thanks&Regards,
K.Arungopal

Unknown said...

hii , how can i run it on eclipse ? and do u think i can do it as an android ?

Lentin Joseph said...

Hi Karim, Yea you can do it android too .. you can run on eclipse also

Anonymous said...

Hi... How can i use on eclipse? Tell me the method, Please....

Lentin Joseph said...

Follow this link to setup opencv on eclipse

http://www.technolabsz.com/2012/08/setting-opencv-on-elipse-working-on.html

Unknown said...

Hi

Please advice me how can I detect the facial components with the exact/approximate shape ie. detect lips with it's shape not only the place where I detect, so I can extract/crop those shapes and then upon those my partner use those images and shapes to calculate mode/expression in each components and then overall face.

I know it's complex, and also don't have sufficient clue to do, so, please give you valuable advises.

Thanks

Lentin Joseph said...

Hi
If you use kinect , you can directly get facial image analysis, if you want to work with webcam ,you can extract ROI of the face portion and do some edge detection to extract the sections.

Unknown said...

Hi Joseph,
Thanks for your useful post. I want to track 5 different color at the same time with opencv, do you any idea or suggestions? Thanks!

Anonymous said...

hi. Thank you for sharing this useful code.
I can compile this very well but i am getting a message at the run time "could not load Classifier cascade"
Can you please guide me to sort this out.
Thank you

Lentin Joseph said...

Hi

Inside the rar file, there is a folder called haar, copy the folder into the exe path, and execute the exe from a dos promot from the same path. It will work

Anonymous said...

Hi Joseph,
Thank you for your guidance. I can run this program from .exe file.
Can you please let me know how it can be run from visual studio rather then dos prompt?

Anonymous said...

i am working in facedetection with java eclipse. and i need to detect eyes and mouth is there any possibility to add mouth detection in the sample of opencv

Anonymous said...

Thank you for this. I'm working on a robot controller based on face pose and I didn't know there were classifiers besides the face. This is exactly what I need for an input to POSIT, etc. Thanks again!

Anonymous said...

Hi Jospeh,

everything works fine. But i waned to detect my own classifier. I have trained it using LBP. And now when i put my classifier in the "haar" filder i build the project it goes smoothly and when i run ./video it gives me this error :
OpenCV Error: Unspecified error (The node does not represent a user object (unknown type?)) in cvRead, file /build/buildd/opencv-2.3.1/modules/core/src/persistence.cpp, line 4857
terminate called after throwing an instance of 'cv::Exception'
what(): /build/buildd/opencv-2.3.1/modules/core/src/persistence.cpp:4857: error: (-2) The node does not represent a user object (unknown type?) in function cvRead

Aborted (core dumped)
//////////
Is there any need to modify the code so it will be able to load the LBP classifier?

Anonymous said...

Hi;
Excellent one
Thank you for your code.
Would appreciate to advise me, how can I run your source code by raspicam.
You know the quality of raspicam is more better than usb cam.
Thanks so much for your kindly reply.

Unknown said...

thanks for the code i am getting the error saying could not load classifier cascade.what should i do next?

Post a Comment