kyamagu / mexopencv

Collection and a development kit of matlab mex functions for OpenCV library
http://kyamagu.github.io/mexopencv
Other
660 stars 319 forks source link

Compilation errors #72

Closed egozi closed 8 years ago

egozi commented 11 years ago

Hi

First, I'd like to note that this is a great contribution and very useful project (at least for me :-)).

I use Ubuntu 13.04, Matlab 2013a and OpenCV 2.4.0.

Almost all the mex were compiled smoothly, 3 cause errors:

src/+cv/calcOpticalFlowPyrLK.cpp: In function ‘void mexFunction(int, mxArray**, int, const mxArray**)’:
   src/+cv/calcOpticalFlowPyrLK.cpp:49:44: error: ‘OPTFLOW_LK_GET_MIN_EIGENVALS’ was not declared in this scope
src/+cv/HOGDescriptor_.cpp: In function ‘void mexFunction(int, mxArray**, int, const mxArray**)’:
   src/+cv/HOGDescriptor_.cpp:125:13: error: ‘struct cv::HOGDescriptor’ has no member named ‘readALTModel’
src/+cv/private/FeatureDetector_.cpp: In function ‘void {anonymous}::set_param(cv::Ptrcv::FeatureDetector&, const string&, MxArray)’:
   src/+cv/private/FeatureDetector_.cpp:66:14: error: ‘class cv::FeatureDetector’ has no member named ‘setString’
   src/+cv/private/FeatureDetector_.cpp:68:14: error: ‘class cv::FeatureDetector’ has no member named ‘setBool’
   src/+cv/private/FeatureDetector_.cpp:70:14: error: ‘class cv::FeatureDetector’ has no member named ‘setDouble’
   src/+cv/private/FeatureDetector_.cpp:72:14: error: ‘class cv::FeatureDetector’ has no member named ‘setInt’
   src/+cv/private/FeatureDetector_.cpp:74:14: error: ‘class cv::FeatureDetector’ has no member named ‘setMat’
   src/+cv/private/FeatureDetector_.cpp:76:14: error: ‘class cv::FeatureDetector’ has no member named ‘setMatVector’
amroamroamro commented 11 years ago

The master branch assumes latest stable OpenCV version (2.4.5 as of now). Otherwise checkout the 2.4.0 tag

egozi commented 11 years ago

How do I " checkout the 2.4.0 tag " ?

amroamroamro commented 11 years ago

@egozi: See this: git checkout 2.4.0 after you have cloned the repository locally. You could also use GitHub to download a tarball

Then again, you might still find some incompatibilities. It's best to stick with the latest 2.4.5 version

egozi commented 11 years ago

Thanks for your help.

I reinstall the newest version of OpenCv which is 2.4.9, and the mexopencv again.

Now I get:

In file included from src/+cv/adaptiveThreshold.cpp:7:0:
include/mexopencv.hpp:55:16: error: ‘CV_DIST_USER’ was not declared in this scope
include/mexopencv.hpp:56:16: error: ‘CV_DIST_L1’ was not declared in this scope
include/mexopencv.hpp:57:16: error: ‘CV_DIST_L2’ was not declared in this scope
include/mexopencv.hpp:58:16: error: ‘CV_DIST_C’ was not declared in this scope
include/mexopencv.hpp:59:16: error: ‘CV_DIST_L12’ was not declared in this scope
include/mexopencv.hpp:60:16: error: ‘CV_DIST_FAIR’ was not declared in this scope
include/mexopencv.hpp:61:16: error: ‘CV_DIST_WELSCH’ was not declared in this scope
include/mexopencv.hpp:62:16: error: ‘CV_DIST_HUBER’ was not declared in this scope

    mex: compile of ' "src/+cv/adaptiveThreshold.cpp"' failed.
amroamroamro commented 11 years ago

@egozi: As I mentioned above, mexopencv is tested against the latest stable release (2.4.5 at this moment). It wont work with the bleeding-edge version (at least without modification)...