Question

i am completly new in openCV(EmguCV) and face comparision. I am trying to implement algorithm which will compare two photos against eigenfaces vector and get me a distance (i know how to get distance of image from training set of images)

I am using Cambridge_FaceDB.zip - db of .pgm images of some faces. I need to load them as training images and use in:

EigenObjectRecognizer recognizer = new EigenObjectRecognizer(
                           trainingImages.ToArray(),
                           labels.ToArray(),
                           3000,
                           ref termCrit); 

trainingImages have to be type of Image but i cant create Image like trainingImages.Add(new Image("test.pgm"));

So I would like to know, how to work with .pgm format and how to add images of this file into training set. Could someone explain me if i am doing something and why? :)

I am using C# wrapper EmguCV, thanks a lot

Was it helpful?

Solution

I believe it should be 'Image'

so it should be

    List<Image<Gray, byte>> trainingImages = new List<Image<Gray, byte>>();
    trainingImages.Add(new Image<Gray, byte>("test.pgm"));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top