Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV FaceRec problem

Hey guys, I'm using OpenCV Version 3.1. I'm trying to use the LBPHFace Class ( But it seems that im doing something wrong. When using LBPHModel->setThreshold(0.0) or LBPHModel->get histograms() i get a error telling me class cv::face::FaceRecognizer' has no member named 'setThreshod or getHsotgrams' . The code compiles and work if i dont use any of these functions.

#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/face.hpp"
Ptr<FaceRecognizer> LBPHModel;

void LBPHLearning(holdingFaces holding){
LBPHModel = createLBPHFaceRecognizer(8,1,8,8);
LBPHModel->train(holding.images, holding.labels);
vector<Mat> histograms = LBPHModel->getHistograms();
cout << "Size of the histograms: " << histograms[0].total() << endl;}

Thanks for your help in advance