Error running ofx Addon example

#1

/home/shank/of-workspace/addons/ofxCv/libs/ofxCv/src/Calibration.cpp: In member function ‘bool ofxCv::Calibration::findBoard(cv::Mat, std::vector<cv::Point_ >&, bool)’:
/home/shank/of-workspace/addons/ofxCv/libs/ofxCv/src/Calibration.cpp:310:30: error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope
int chessFlags = CV_CALIB_CB_ADAPTIVE_THRESH;// | CV_CALIB_CB_NORMALIZE_IMAGE;
^~~~~~~~~~~~~~~~~~~~~~~~~~~

Here is another error related to ofxCV
opt/openFrameworks/addons/ofxCv/libs/CLD/src/ETF.cpp: In member function ‘void ETF::Smooth(int, int)’:
/opt/openFrameworks/addons/ofxCv/libs/CLD/src/ETF.cpp:205:6: warning: unused variable ‘MAX_GRADIENT’ [-Wunused-variable]
int MAX_GRADIENT = -1;
^~~~~~~~~~~~

#2

It is not enough to copy and paste the error message in the forum to get a chance to have someone looking into your issue. Try to report at least your operating system and which version of OF you are using.

#3

oh pardon me, I am using OF-0.10.1 and using arch linux

#4

Can it be something related to the new open CV version that comes with some linux distro? I know for example, that ubuntu is shipping the new one, and if you use one of the nightly build, it should be fixed. I think that @hamoid knows more details about Arch Linux.

#5

Also, maybe related:

#6

Do I need to add this somewhere in the project?

HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) "../../../addons/ofxOpenCv/libs/opencv/include/" "../../../addons/ofxCv/libs/ofxCv/include/"
#7

yes if you are using a recent linux distro you need to use the nightly builds by now until we do a new release

1 Like
#8

but you might have errors in ofxCv cause it’s not adapted to opencv4 yet. in that case you should report those errors in the ofxCv repository on github

#9

Currently I am getting an error running ofxFacetracker

/home/shank/of-workspace/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Patch.cc: In member function ‘void FACETRACKER::Patch::Response(cv::Mat&, cv::Mat&)’:
/home/shank/of-workspace/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Patch.cc:165:31: error: ‘CV_TM_CCOEFF_NORMED’ was not declared in this scope
cv::matchTemplate(I,W,res,CV_TM_CCOEFF_NORMED);
^~~~~~~~~~~~~~~~~~~
/home/shank/of-workspace/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Patch.cc: In member function ‘void FACETRACKER::MPatch::Response(cv::Mat&, cv::Mat&)’:
/home/shank/of-workspace/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Patch.cc:239:12: error: ‘cvScalar’ was not declared in this scope
resp = cvScalar(1.0);

#10

Then you should add an issue to the maintainer of that addon, https://github.com/kylemcdonald/ofxFaceTracker

#11

And in general, when reporting a problem also on github, try to add a bit of context. The platform that you are using, the OF version, how did you received that error. A well described problem get more chances to get fixed than a message error copied and pasted from your console to github.