mohammed hossam
mohammed hossam

Reputation: 45

createEigenFaceRecognizer is giving an error "is undefined"

I am trying to do face recognition using opencv using eigenfaces or PCA algorithm but it is giving error while initializing the recognizer that it is undefined ... please help

int num_components = 10;
double threshold = 10.0;
Ptr<FaceRecognizer> model =  createEigenFaceRecognizer(num_components,threshold);

model->train(images, labels);

Upvotes: 2

Views: 1635

Answers (1)

berak
berak

Reputation: 39796

in opencv2.4, you'd have to :

#include "opencv2/contrib/contrib.hpp"
// and ofc. link to opencv_contrib.lib

in opencv3.0, you'd have to build/install the opencv_contrib repo, then:

#include "opencv2/face.hpp"
// and link to opencv_face.lib

Upvotes: 1

Related Questions