OpenCV / Android编译错误

前端之家收集整理的这篇文章主要介绍了OpenCV / Android编译错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我目前正在关注如何在 Windows中为 Android设置OpenCV的本教程(http://www.stanford.edu/class/ee368/Android/Tutorial-2-OpenCV-for-Android-Setup-Windows.pdf)我有一些我不理解的错误.基本上,在步骤3.c,当我使用命令“make”在Cygwin中编译OpenCV库时,我得到这些错误;
/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

提前谢谢你的帮助,

拉尔夫.

解决方法

在calibfilter.cpp和epilines.cpp的顶部有一个“#undef quad”.如果我注释掉这些undefs,它就会成功编译.

对于我的生活,我无法弄清楚为什么有一个undef那里…也许进口的顺序是错的或什么的.

猜你在找的Android相关文章