Reputation: 45
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
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