Ask Your Question

Gawajn's profile - activity

2016-09-16 08:25:39 -0600 commented answer OpenCV FaceRec problem

thanks for this helpful and very fast answer!!!

2016-09-16 08:25:07 -0600 received badge  Supporter (source)
2016-09-16 08:25:05 -0600 received badge  Scholar (source)
2016-09-16 08:15:37 -0600 asked a question OpenCV FaceRec problem

Hey guys, I'm using OpenCV Version 3.1. I'm trying to use the LBPHFace Class (http://docs.opencv.org/trunk/df/d25/c...) 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->setThreshold(0.0);    
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

2016-09-16 08:15:36 -0600 asked a question OpenCV FaceRec problem

Hey guys, I'm using OpenCV Version 3.1. I'm trying to use the LBPHFace Class (http://docs.opencv.org/trunk/df/d25/c...) 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->setThreshold(0.0);    
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