Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Getting error while compiling sampleDetectLandmarks.cpp

I was trying to compiling sampleDetectLandmarks.cpp but I'm getting this error please help me resolving this error

sampleDetectLandmarks.cpp: In function ‘int main(int, char**)’:
sampleDetectLandmarks.cpp:69:5: error: ‘FacemarkKazemi’ has not been declared
     FacemarkKazemi::Params params;
     ^~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:70:9: error: ‘FacemarkKazemi’ was not declared in this scope
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
         ^~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:70:23: error: template argument 1 is invalid
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
                       ^
sampleDetectLandmarks.cpp:70:36: error: ‘FacemarkKazemi’ is not a class, namespace, or enumeration
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
                                    ^~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:70:59: error: ‘params’ was not declared in this scope
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
                                                           ^~~~~~
sampleDetectLandmarks.cpp:70:59: note: suggested alternative: ‘parser’
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
                                                           ^~~~~~
                                                           parser
sampleDetectLandmarks.cpp:71:13: error: base operand of ‘->’ is not a pointer
     facemark->setFaceDetector((FN_FaceDetector)myDetector, &face_cascade);
             ^~
sampleDetectLandmarks.cpp:71:32: error: ‘FN_FaceDetector’ was not declared in this scope
     facemark->setFaceDetector((FN_FaceDetector)myDetector, &face_cascade);
                                ^~~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:71:32: note: suggested alternative: ‘myDetector’
     facemark->setFaceDetector((FN_FaceDetector)myDetector, &face_cascade);
                                ^~~~~~~~~~~~~~~
                                myDetector
sampleDetectLandmarks.cpp:72:13: error: base operand of ‘->’ is not a pointer
     facemark->loadModel(filename);
             ^~
sampleDetectLandmarks.cpp:75:41: error: ‘INTER_LINEAR_EXACT’ was not declared in this scope
     resize(img,img,Size(460,460), 0, 0, INTER_LINEAR_EXACT);
                                         ^~~~~~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:75:41: note: suggested alternative: ‘CV_INTER_LINEAR’
     resize(img,img,Size(460,460), 0, 0, INTER_LINEAR_EXACT);
                                         ^~~~~~~~~~~~~~~~~~
                                         CV_INTER_LINEAR
sampleDetectLandmarks.cpp:76:13: error: base operand of ‘->’ is not a pointer
     facemark->getFaces(img,faces);
             ^~
sampleDetectLandmarks.cpp:82:20: error: base operand of ‘->’ is not a pointer
         if(facemark->fit(img,faces,shapes))

Getting error while compiling sampleDetectLandmarks.cpp

I was trying to compiling sampleDetectLandmarks.cpp but I'm getting this error please help me resolving this error

sampleDetectLandmarks.cpp: In function ‘int main(int, char**)’:
sampleDetectLandmarks.cpp:69:5: error: ‘FacemarkKazemi’ has not been declared
     FacemarkKazemi::Params params;
     ^~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:70:9: error: ‘FacemarkKazemi’ was not declared in this scope
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
         ^~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:70:23: error: template argument 1 is invalid
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
                       ^
sampleDetectLandmarks.cpp:70:36: error: ‘FacemarkKazemi’ is not a class, namespace, or enumeration
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
                                    ^~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:70:59: error: ‘params’ was not declared in this scope
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
                                                           ^~~~~~
sampleDetectLandmarks.cpp:70:59: note: suggested alternative: ‘parser’
     Ptr<FacemarkKazemi> facemark = FacemarkKazemi::create(params);
                                                           ^~~~~~
                                                           parser
sampleDetectLandmarks.cpp:71:13: error: base operand of ‘->’ is not a pointer
     facemark->setFaceDetector((FN_FaceDetector)myDetector, &face_cascade);
             ^~
sampleDetectLandmarks.cpp:71:32: error: ‘FN_FaceDetector’ was not declared in this scope
     facemark->setFaceDetector((FN_FaceDetector)myDetector, &face_cascade);
                                ^~~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:71:32: note: suggested alternative: ‘myDetector’
     facemark->setFaceDetector((FN_FaceDetector)myDetector, &face_cascade);
                                ^~~~~~~~~~~~~~~
                                myDetector
sampleDetectLandmarks.cpp:72:13: error: base operand of ‘->’ is not a pointer
     facemark->loadModel(filename);
             ^~
sampleDetectLandmarks.cpp:75:41: error: ‘INTER_LINEAR_EXACT’ was not declared in this scope
     resize(img,img,Size(460,460), 0, 0, INTER_LINEAR_EXACT);
                                         ^~~~~~~~~~~~~~~~~~
sampleDetectLandmarks.cpp:75:41: note: suggested alternative: ‘CV_INTER_LINEAR’
     resize(img,img,Size(460,460), 0, 0, INTER_LINEAR_EXACT);
                                         ^~~~~~~~~~~~~~~~~~
                                         CV_INTER_LINEAR
sampleDetectLandmarks.cpp:76:13: error: base operand of ‘->’ is not a pointer
     facemark->getFaces(img,faces);
             ^~
sampleDetectLandmarks.cpp:82:20: error: base operand of ‘->’ is not a pointer
         if(facemark->fit(img,faces,shapes))