train faces for opencv face recongizer

asked 2013-11-24 22:09:43 -0500

Indra gravatar image

updated 2013-11-25 02:00:45 -0500

berak gravatar image

Hi , I want to have a simple solution to recognize the face against simple face data base(maximum 5 faces). I am using this sample code. http://docs.opencv.org/trunk/modules/contrib/doc/facerec/tutorial/facerec_video_recognition.html

I captured 5 different person images and added the proper images by cropping to only faces and setting all images pixels to same size 874x1240 .. and my sample csv file looks like below

/home/algos/search/data/00.png;11 /home/algos/search/data/01.png;22 /home/algos/search/data/02.png;33 /home/algos/search/data/03.png;44

above faces are faces of four diffrent person .

I have added totally four different faces , but when I run the code it always prints the prediction =11 for any person who appears infront of camera .. Can you pls help to find out what problem I am doing during image training ..?

edit retag flag offensive close merge delete

Comments

  • one image per person is not enough. you need 10-30
  • try smaller images. (100x100), also 'square' not rectangular( since that's the outcome of the cascade classifier )
berak gravatar imageberak ( 2013-11-25 02:04:44 -0500 )edit