Issues compiling ofxFracetracker

#1

hey any clue how to fix this, where should be pointed at???


/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/include/FaceTracker/IO.h:42:10: fatal error: opencv/cv.h: No such file or directory
   42 | #include <opencv/cv.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
#2

Hi. did you fix it? it is an old header no longer included. put #include "opencv2/opencv.hpp" instead

#3

hi unfortunately no when i delete the line #include <opencv2/cv.h> from IO.h and just leave the other one i start getting this errors instead

In file included from /home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/include/FaceTracker/Tracker.h:4
,
                 from /home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:40:
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/include/FaceTracker/FDet.h:82:25: error: ‘CvMemStorag
’ does not name a type
   82 |     cv::Mat small_img_; CvMemStorage* storage_;
      |                         ^~~~~~~~~~~~
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/include/FaceTracker/FDet.h: In constructor ‘FACETRACKER::FDet::FDet()’:
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/include/FaceTracker/FDet.h:59:12: error: ‘storage_’ was not declared in this scope
   59 |     FDet(){storage_=NULL;_cascade=NULL;}
      |            ^~~~~~~~
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc: In member function ‘int FACETRACKER::Tracker::Track(cv::Mat, std::vector<int>&, int, int, double, double, bool)’:
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:94:27: error: ‘CV_BGR2GRAY’ was not declared in this scope
   94 |     cv::cvtColor(im,gray_,CV_BGR2GRAY);
      |                           ^~~~~~~~~~~
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc: In member function ‘cv::Rect FACETRACKER::Tracker::ReDetect(cv::Mat&)’:
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:141:58: error: ‘CV_INTER_LINEAR’ was not declared in this scope
  141 |   cv::resize(im,small_,cv::Size(TSCALE*ww,TSCALE*hh),0,0,CV_INTER_LINEAR);
      |                                                          ^~~~~~~~~~~~~~~
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:143:3: error: ‘IplImage’ was not declared in this scope
  143 |   IplImage im_o = small_,temp_o = temp_,ncc_o = ncc_;
      |   ^~~~~~~~
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:144:20: error: ‘im_o’ was not declared in this scope
  144 |   cvMatchTemplate(&im_o,&temp_o,&ncc_o,CV_TM_CCOEFF_NORMED);
      |                    ^~~~
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:144:26: error: ‘temp_o’ was not declared in this scope; did you mean ‘temp_’?
  144 |   cvMatchTemplate(&im_o,&temp_o,&ncc_o,CV_TM_CCOEFF_NORMED);
      |                          ^~~~~~
      |                          temp_
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:144:34: error: ‘ncc_o’ was not declared in this scope; did you mean ‘ncc_’?
  144 |   cvMatchTemplate(&im_o,&temp_o,&ncc_o,CV_TM_CCOEFF_NORMED);
      |                                  ^~~~~
      |                                  ncc_
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:144:40: error: ‘CV_TM_CCOEFF_NORME
’ was not declared in this scope
  144 |   cvMatchTemplate(&im_o,&temp_o,&ncc_o,CV_TM_CCOEFF_NORMED);
      |                                        ^~~~~~~~~~~~~~~~~~~
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:144:3: error: ‘cvMatchTemplate’ was not declared in this scope; did you mean ‘UpdateTemplate’?
  144 |   cvMatchTemplate(&im_o,&temp_o,&ncc_o,CV_TM_CCOEFF_NORMED);
      |   ^~~~~~~~~~~~~~~
      |   UpdateTemplate
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc: In member function ‘cv::Rect FACETRACKER::Tracker::UpdateTemplate(cv::Mat&, cv::Mat&, bool)’:
/home/jacos/OF/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc:178:62: error: ‘CV_INTER_LINEAR’ was not declared in this scope
  178 |       cv::resize(im,small_,cv::Size(TSCALE*ww,TSCALE*hh),0,0,CV_INTER_LINEAR);
      |                                                              ^~~~~~~~~~~~~~~
make[1]: *** [/home/jacos/OF/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:364: /home/jacos/OF/addons/obj/linux64/Release/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.o] Error 1
make[1]: Leaving directory '/home/jacos/OF/addons/ofxFaceTracker/example-advanced'
make: *** [/home/jacos/OF/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

so

#4

Hi, all those errors are the C definitions for openCv which at some point were not included any more automatically. Just search in the openCV includes folder for where all these are defined, at the end you’ll need to add just one or two includes. There are some similar questions in the forum, but I have no time now to look for those. sorry.