Pages

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:

  1. 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.

    ReplyDelete
  2. Hi

    Please check this link

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

    ReplyDelete
  3. hai

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

    Thanks
    Anand

    ReplyDelete
  4. This comment has been removed by the author.

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

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. This comment has been removed by the author.

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

    ReplyDelete
  9. 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

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


    Thanks&Regards,
    K.Arungopal

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

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

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

    ReplyDelete
  14. Follow this link to setup opencv on eclipse

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

    ReplyDelete
  15. 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

    ReplyDelete
  16. 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.

    ReplyDelete
  17. 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!

    ReplyDelete
  18. 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

    ReplyDelete
  19. 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

    ReplyDelete
  20. 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?

    ReplyDelete
  21. 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

    ReplyDelete
  22. 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!

    ReplyDelete
  23. 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?

    ReplyDelete
  24. 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.

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

    ReplyDelete