Using EigenObjectRecognizer

Posted by Meko on Stack Overflow See other posts from Stack Overflow or by Meko
Published on 2010-05-14T20:48:34Z Indexed on 2010/05/14 21:34 UTC
Read the original article Hit count: 1178

Filed under:
|

Hi. I am trying make Facial recognition using Emgu Cv. And using EigenObjectRecognizer could I do it? Also is some one can explain that usage of it? because if there is a no same foto it also returns value. Here is example from Internet

    Image<Gray, Byte>[] trainingImages = new Image<Gray,Byte>[5];  
        trainingImages[0] = new Image<Gray, byte>("brad.jpg");
        trainingImages[1] = new Image<Gray, byte>("david.jpg");
        trainingImages[2] = new Image<Gray, byte>("foof.jpg");
        trainingImages[3] = new Image<Gray, byte>("irfan.jpg");
        trainingImages[4] = new Image<Gray, byte>("joel.jpg");
 String[] labels = new String[] { "Brad", "David", "Foof", "Irfan" , "Joel"}
  MCvTermCriteria termCrit = new MCvTermCriteria(16, 0.001); 

    EigenObjectRecognizer recognizer = new EigenObjectRecognizer(
       trainingImages,
       labels,
       5000,
       ref termCrit);
        Image<Gray,Byte> testImage = new Image<Gray,Byte>("brad_test.jpg");

     String label = recognizer.Recognize(testImage);
     Console.Write(label);

It returns brad .But if I change photo in testimage it also retunrs some name or even Brad.Is it good for face recognition to use this method?Or is there any better method?

© Stack Overflow or respective owner

Related posts about c#

Related posts about emgucv