kylemcdonald / ofxFaceTracker

CLM face tracking addon for openFrameworks based on Jason Saragih's FaceTracker.
http://facetracker.net/
Other
1.39k stars 371 forks source link

opencv.h "No such file or directory" with OF 0.10.2 #164

Closed rdtor closed 4 years ago

rdtor commented 5 years ago

/src/main.cpp:1: /home/shank/of-workspace/addons/ofxFaceTracker/libs/FaceTracker/include/FaceTracker/IO.h:42:10: fatal error: opencv/opencv.h: No such file or directory

include <opencv/cv.h>

      ^~~~~~~~~~~~~~~~~

compilation terminated. make[1]: [/home/shank/of-workspace/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:217: obj/linux64/Release/src/main.o] Error 1 make[1]: Leaving directory '/home/shank/of-workspace/addons/ofxFaceTracker/example-blink' make: [/home/shank/of-workspace/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

cyrstem commented 5 years ago

did you find a way to fix this? im having the same issue?

emmabh commented 4 years ago

Hi! I'm also having this issue. I tried to use the updated header file but I am still getting issues left and right because in the new openCV cvHaarClassifier objects are different. Has anyone resolved this issue?

kylemcdonald commented 4 years ago

Hi everyone, the problem is that openFrameworks 10.2 upgraded OpenCV to version 4.0.1, and FaceTracker is not compatible with this version. The quickest fix is to use openFrameworks 10.1, which uses OpenCV 3.1.

A longer term solution will be to rewrite FaceTracker to use the OpenCV 4.0 API. The main change that needs to be made is in the Haar detection system. OpenCV 4.0 removes cvLoad, cvHaarDetectObjects and other related functions. FaceTracker uses these functions inside FDet.cc https://github.com/kylemcdonald/ofxFaceTracker/blob/master/libs/FaceTracker/src/lib/FDet.cc

For reference, look at the ofxOpenCv changes its implementation https://github.com/openframeworks/openFrameworks/blob/patch-release/addons/ofxOpenCv/src/ofxCvHaarFinder.cpp

I can't make these changes now but would really appreciate any help on fixing this!

kylemcdonald commented 4 years ago

@oxillo if you have a chance to take a look at this it would be hugely appreciated 🙏

veacks commented 4 years ago

Found a trick to make 10.1 workings on Catalina:

  1. First, add signing certificate in Xcode,

  2. Then run the build until it fails

  3. Then with terminal do the following

$ cd my-app.app/bin/my-appDebug.app/Contents/Frameworks/
$ codesign -s "<your-comp-name>" libfmodex.dylib
  1. Then open your app manually

Redo 3 and 4 for each build.

vladkoval009 commented 4 years ago

Has anyone solved this problem? There is now OF version 0.11.0. I tried a recompile the faceOSC but I get so many errors. At this point this add-on is unusable. Has anyone tried to run FaceOSC.exe? My webcam does not switch on, its basically stuck at scanning my face indefinitely

kylemcdonald commented 4 years ago

It will not be possible to get this running on OF 0.10.2 and higher (including 0.11.0) due to OpenCV 4. The FaceTracker library has a dependency on OpenCV code that was removed starting with 0.10.2.

I have updated the MacOS FaceOSC binary under "releases" to work with MacOS 10.15 (Catalina) using OF 0.10.1.