Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCV/Android compilation errors

I am currently following this tutorial (http://www.stanford.edu/class/ee368/Android/Tutorial-2-OpenCV-for-Android-Setup-Windows.pdf) on how to set up OpenCV for Android in Windows and I am having some errors that I do not understand. Basically, at the step 3.c, when I compile the OpenCV libraries in Cygwin using the command “make”, I get these errors;

/home/Ralph/opencv/modules/legacy/src/calibfilter.cpp: In member function `virtual bool CvCalibFilter::SaveCameraParams(const char*)':
/home/Ralph/opencv/modules/legacy/src/calibfilter.cpp:693: error: `struct CvStereoCamera' has no member named `quad'
/home/Ralph/opencv/modules/legacy/src/calibfilter.cpp:694: error: `struct CvStereoCamera' has no member named `quad'
/home/Ralph/opencv/modules/legacy/src/calibfilter.cpp: In member function `virtual bool CvCalibFilter::LoadCameraParams(const char*)':
/home/Ralph/opencv/modules/legacy/src/calibfilter.cpp:749: error: `struct CvStereoCamera' has no member named `quad'
/home/Ralph/opencv/modules/legacy/src/calibfilter.cpp:750: error: `struct CvStereoCamera' has no member named `quad'
make[2]: *** [modules/legacy/CMakeFiles/opencv_legacy.dir/src/calibfilter.o] Error 1
make[1]: *** [modules/legacy/CMakeFiles/opencv_legacy.dir/all] Error 2
make: *** [all] Error 2 

Thank you for your help in advance,

Ralph.

like image 820
ralph Avatar asked Jun 29 '11 02:06

ralph


1 Answers

There is an "#undef quad" at the top of both calibfilter.cpp and epilines.cpp. If I comment out these undefs, it succeeds in compiling.

For the life of me I can't figure out why there is an undef there... maybe the order of imports is wrong or something.

like image 170
Matthew Hemke Avatar answered Oct 11 '22 03:10

Matthew Hemke