我尝试使用cygwin在我的Windows上安装OpenCV,使用以下命令:
cd ~
git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 2.4.5
mkdir build
cd build
cmake -G "Unix Makefiles" ..
make -j8
sudo make install
问题出在我尝试使用命令之后:" make -j8" ,我得到这个错误大约67%:
[ 67%] Building CXX object modules/legacy/CMakeFiles/opencv_legacy.dir/src/calibfilter.cpp.o
/cygdrive/d/newbuild/opencv/modules/legacy/src/calibfilter.cpp: In member function ‘virtual bool CvCalibFilter::SaveCameraParams(const char*)’:
/cygdrive/d/newbuild/opencv/modules/legacy/src/calibfilter.cpp:689:47: error: ‘CvStereoCamera {aka struct CvStereoCamera}’ has no member named ‘quad’
fprintf(f, "%15.10f ", stereo.quad[i][j].x );
^
/cygdrive/d/newbuild/opencv/modules/legacy/src/calibfilter.cpp:690:47: error: ‘CvStereoCamera {aka struct CvStereoCamera}’ has no member named ‘quad’
fprintf(f, "%15.10f ", stereo.quad[i][j].y );
^
/cygdrive/d/newbuild/opencv/modules/legacy/src/calibfilter.cpp: In member function ‘virtual bool CvCalibFilter::LoadCameraParams(const char*)’:
/cygdrive/d/newbuild/opencv/modules/legacy/src/calibfilter.cpp:746:57: error: ‘CvStereoCamera {aka struct CvStereoCamera}’ has no member named ‘quad’
int values_read = fscanf(f, "%f ", &(stereo.quad[i][j].x) );
^
/cygdrive/d/newbuild/opencv/modules/legacy/src/calibfilter.cpp:748:53: error: ‘CvStereoCamera {aka struct CvStereoCamera}’ has no member named ‘quad’
values_read = fscanf(f, "%f ", &(stereo.quad[i][j].y) );
^
make[2]: *** [modules/legacy/CMakeFiles/opencv_legacy.dir/build.make:639: modules/legacy/CMakeFiles/opencv_legacy.dir/src/calibfilter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4703: modules/legacy/CMakeFiles/opencv_legacy.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
我该如何解决这个问题?我已经尝试过使用" make"而不是" make -j" 没有区别
编辑:我想使用OpenCV的特定2.4.5版本