Click here to Skip to main content
15,882,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I think i have a problem with my project ,
it's about an application for employee attandance using face recognition,


i use emgu cv to develop my project ,but when i have try to test my program by train my face and my friend's face ,it show an incorrect result ,

I try to capture my face using the camera ,
but the result show that it was my friend face ,

i think i need to improve the accuracy ,

ok i think i have found it,

What I have tried:

This is my current code when it was show incorrect
EigenObjectRecognizer recognizer = new EigenObjectRecognizer(
                           trainingimages.ToArray(),
                           labels.ToArray(),
                           3000,//this is the different
                           ref termCrit);


i change code into this
EigenObjectRecognizer recognizer = new EigenObjectRecognizer(
                           trainingimages.ToArray(),
                           labels.ToArray(),
                           100, //this is the different
                           ref termCrit);


and it show and detect face accurate,

can any one explain me about the differences of 3000 and 100 in my code?
Posted
Updated 18-Aug-20 18:48pm
Comments
BillWoodruff 19-Aug-20 7:14am    
Have you considered the quality of the images produced by your camera system.

1 solution

Reference: EigenObjectRecognizer Constructor (images, labels, eigenDistanceThreshold, termCrit)[^]
Quote:
eigenDistanceThreshold (Double)
The eigen distance threshold, (0, ~1000]. The smaller the number, the more likely an examined image will be treated as unrecognized object. If the threshold is < 0, the recognizer will always treated the examined image as one of the known object.

Changing it from 3000 to 100 made it treat as unrecogized and thus more calc to figure where to fit which mostly leads to accuracy.

Raw terms: Higher the number, lower the clarity of image and thus features. This in turn can confuse between two images. Cost with making it clear - will take more time to train.

Hope that clarifies!
 
Share this answer
 
v3
Comments
Member 14760154 19-Aug-20 3:35am    
Higher the number, lower the clarity of image and thus features.

how can i know test this?

can you suggest me a way?
Sandeep Mewara 19-Aug-20 3:51am    
Thats what you tested already. Now maybe, plot the image and see.
Sandeep Mewara 19-Aug-20 3:52am    
Here, see this example - someone tried and kind of shares what I told: https://stackoverflow.com/a/43882117
BillWoodruff 19-Aug-20 7:13am    
+5
Sandeep Mewara 19-Aug-20 7:24am    
Thanks! guess you missed +5 though :D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900