Hi,I am getting this error Program1.cpp|| undefined reference to `cv::face::FaceRecognizer::predict(cv::_InputArray const&) const'|
here is my code snippet
#include <opencv2/core/core.hpp>
#include "opencv2/core.hpp"
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/objdetect.hpp"
#include "opencv2/face/facerec.hpp"
#include "opencv2/face.hpp"
#include<bits/stdc++.h>
using namespace cv;
using namespace std;
using namespace cv::face;
/*declaration of global variables */
int image_flag=1;//flag for depicting success/failure of reading a image
CascadeClassifier face_cascade;
CascadeClassifier eyes_cascade;
String face_cascade_name, eyes_cascade_name;
vector<int> labels;
Ptr<face::FaceRecognizer> model = face::createFisherFaceRecognizer();
thanks in advance!
your code snippet never calls predict(), so it's a lie.
(and somehow, you forgot to link the opencv_face lib)
yeah the error predict is coming as FaceRecognizer is not getting detected,I have included face.hpp
can u please tell more about the the opencv_face lib
check if you have -lopencv_face in your makefile or such (you added another module, you need the resp. lib)
also, os, opencv version, etc. required
OpenCV 3.2.0 ,windows 10 ,actually I am compiling with codeblocks ,so where should I look for makefile? Thanks
I am a complete newbie ,just started working on opencv 2 days back
if that's using mingw, it's probably
-lopencv_face320
I am getting this error now i codebocks face.hpp should be buit as a c++ file
I am building it as a cpp file then why the error?
sorry, but i have no idea, what you're doing there ;(
I noticed that face flag s not there ,how to add tat ?