You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After doing that, the only remaining symbols not declared are cvLoadImage and cvSaveImage. This is apparently because they no longer exist, and instead have been replaced by cv::imread and cv::imwrite. Unfortunately, the latter two are different enough from the former two that you'd need more knowledge than I have about OpenCV (namely, zero) to fix them.
I use Linux Mint, and I would simply have worked around the problem by installing OpenCV 2, but unfortunately this seems to be a rather difficult thing to do in recent versions of Linux Mint (and I assume, Ubuntu).
The text was updated successfully, but these errors were encountered:
Well, I looked at this a little further, and I find that if I add the following to main.cpp, then at least main.cpp compiles without error. I don't claim that it works, just that it compiles:
However, the build fails further on, at marker.cpp. If to marker.cpp I add
#include <opencv2/highgui/highgui_c.h>
then the only error remaining in marker.cpp is
.../voussoir/marker.cpp:176:5: error: ‘cvFindHomography’ was not declared in this scope
But, cvFindHomography has been discontinued in favor of cv::FindHomography. Conceptually, the basic fix for this seems to be to add
#include <opencv2/calib3d.hpp>
#define cvFindHomography(src,dst,h) h = cv::findHomography((src),(dst))
Unfortunately, the datatypes of the src and dst parameters differ, so the compilation still fails due to this incompatibility. I haven't looked into that datatype incompatibility.
The compiler reports that numerous functions are "not declared in this scope".
Most of the problems are easy to fix — or at least, the error messages from the compiler are easy to eliminate — by adding the following to main.cpp:
After doing that, the only remaining symbols not declared are
cvLoadImage
andcvSaveImage
. This is apparently because they no longer exist, and instead have been replaced bycv::imread
andcv::imwrite
. Unfortunately, the latter two are different enough from the former two that you'd need more knowledge than I have about OpenCV (namely, zero) to fix them.I use Linux Mint, and I would simply have worked around the problem by installing OpenCV 2, but unfortunately this seems to be a rather difficult thing to do in recent versions of Linux Mint (and I assume, Ubuntu).
The text was updated successfully, but these errors were encountered: