Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
how can i compare two image and recongnize the almost simmilar image.actually i would use this code for face recongnition..eigenfaceobject recongnizer needs array to save images compulsory...but i need single recongnition....here is a code i have found ...can anyone explain this variables
C#
public const double PERCENT_MATCH = 0.9;

int noMatchCount = 0;
for (int x = 0; x < irMainX; x++)
{
    for (int y = 0; y < irMainY; y++)
    {
       if ( !pixelsMatch( image.GetPixel(x,y), srClickedArray[x%16, y%16] )
       {
           noMatchCount++;
           if ( noMatchCount > ( 16 * 16 * ( 1.0 - PERCENT_MATCH ))
              goto matchFailed;
       }
    }
}
Console.WriteLine("images are >=90% identical");
return;
matchFailed:
Console.WriteLine("image are <90% identical");
Posted
Updated 8-Oct-15 14:34pm
v2
Comments
phil.o 9-Oct-15 0:40am    
"Can anyone explain this code" is not a valid question.
Either you write your own code and present here your issues with it, or you do make some research about concepts and algorithms you need to fulfill your requirements. But there is no way someone will explain you a piece of code that you just copy-pasted from somewhere and which is completely out of context.

1 solution

If only there were some articles on face recognition[^] available.

If you want to deal with face recognition, you have to understand the subject itself, not just a bunch of variables from a code obtained from anywhere.
And knowledge is the daughter of research and study.
 
Share this answer
 

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