Opencv会出错

时间:2014-07-16 22:42:13

标签: opencv

我在make opencv期间看到了这个: 我下载了opencv git的源代码

[ 22%] Built target pch_Generate_opencv_highgui
[ 22%] Built target opencv_highgui
[ 22%] Built target opencv_videoio_pch_dephelp
[ 22%] Built target pch_Generate_opencv_videoio
[ 22%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_v4l.cpp.o
/home/fhwa/opencv/modules/videoio/src/cap_v4l.cpp: In function ‘bool mjpeg_to_rgb24(int, int, unsigned char*, int, unsigned char*)’:
/home/fhwa/opencv/modules/videoio/src/cap_v4l.cpp:1740:16: error: ‘imdecode’ is not a member of ‘cv’
   cv::Mat temp=cv::imdecode(cv::Mat(std::vector<uchar>(src, src + length)), 1);
                ^
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_v4l.cpp.o] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2

任何提示?我想念一些包吗?

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:1)

您可以使用plhn解决方案,也可以在最新的稳定标记上执行git checkout

$git tag -l #list all tags
$git checkout 2.4.9 #thats the latest stable version

这将检出与最新稳定包中相同的版本。但作为奖励,如果出现一些不明确的异常,您可以查看源代码。