Reputation: 41
I'm using openCV library in my c# application to detect face due to my knowledge base images,but there's a problem when detecting faces,in first time my function detect correctly the person A's face and show his name,but after this detection the function has another detect for the same person A's face but this time with person B's name and despite there's no person B in scene but unfortunately his face get detected in wrong operation. here is my recognizer function code :
MCvTermCriteria termCrit = new MCvTermCriteria(countTrain, 0.001);
EigenObjectRecognizer recognizer = new EigenObjectRecognizer(trainingImages.ToArray(), clientInfo.ToArray(), 2500, ref termCrit);
Emgu.CV.EigenObjectRecognizer.RecognitionResult recognizerResult = recognizer.Recognize(result);
in above code,I pass the trained image array and owners label array to function for detection operation.
Upvotes: 0
Views: 666
Reputation: 1652
Face recognition is not a simple problem, because the human face can vary a lot between two attempts, it sounds to me like perhaps your recognizer is working correctly, but might not be trained as well as you like.
The eigen method for face recognition is very sensitive to pose of the face, for example. If you train the recognizer with images of person A looking to the left, and person B looking to the right, then person A moves in front of the camera and looks to the right, it will probably tag them as person B, because their pose is a more dramatic change then their facial features.
I would suggest training your model with lots of images of each person, perhaps with a few varying poses, or ensure your users look straight on at the camera each time.
Also it might be worth looking at using the "local binary pattern histogram" model instead of eigen, as I found this to be a lot more robust.
TL;DR
I think your recognizer is probably working, but could be improved with more training data I would suggest you follow this link and learn as much as you can, its a great resource for facial recognition in the EMGU wrapper.
Upvotes: 1