Coderzelf
Coderzelf

Reputation: 752

Opencv make error

I see this during make opencv: I download source for 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

any hint? do I miss some packages?

Upvotes: 0

Views: 862

Answers (2)

morynicz
morynicz

Reputation: 2342

You can either use plhn solution, or do git checkout on latest stable tag:

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

This will checkout the same version as in latest stable packages. But as a bonus, You can look into the sourcecode if some not clear exceptions appear.

Upvotes: 1

plhn
plhn

Reputation: 5273

Try a stable version

wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/download

not cutting-edge version(from git)

Upvotes: 2

Related Questions