OpenCV 2.4.6.1 CMake Errors...

asked 2013-07-29 12:02:21 -0500

updated 2013-07-29 12:04:48 -0500

Hi, all:

Environment: Ubuntu 13.04 + OpenCV 2.4.6.1

CMake Errors in build/CMakeFiles/CMakeError.log are briefly summarized as: 1. linux/videodev.h:No such file or directory 2. sys/videoio.h:No such file or directory 3. ffmpeg/avformat.h: No such file or directory

I did a brief investigation,

  1. ./modules/highgui/src/cap_libv4l.cpp : #include <linux/videodev.h> ./modules/highgui/src/cap_v4l.cpp : #include <linux/videodev.h>
  2. ./modules/highgui/src/cap_v4l.cpp : #include <sys/videoio.h>
  3. modules/highgui/src/ffmpeg_codecs.hpp : #include <ffmpeg/avformat.h>

Conclusions can be drawn as:

  1. HAVE_CAMV4L, HAVE_CAMV4L2, HAVE_VIDEOIO should be exclusively defined. For instance, in my case, Ubuntu 13.04 corresponds to HAVE_CAMV4L2. When I do ccmake ../ -- the out of source build, where can I specify it's HAVE_CAMV4L, HAVE_CAMV4L2 or HAVE_VIDEOIO?
  2. I didn't use the default ffmpeg installed from the default Ubuntu 13.04 repository, but use the most recent ffmpeg 2.0 instead. It seems I've got /usr/include/libavformat/avformat.h, but not ffmpeg/avformat.h. How can I specify, I'm having HAVE_LIBAVFORMAT_AVFORMAT_H instead of HAVE_FFMPEG_AVFORMAT_H ?

Cheers Pei

edit retag flag offensive close merge delete