Ask Your Question

OpenCV 2.4.4 Debian installation

asked 2013-02-18 02:31:08 -0500

CMogilko gravatar image

Hello, I tried to compile OCV 2.4.4 from sourceforge on Debian Wheezy. Here cmake config:

    root@CMogilkoDebian:/home/cmogilko/sources/OpenCV-2.4.4# cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ./
-- Detected version of GNU GCC: 47 (407)
-- Found OpenEXR: /usr/lib/
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- CUDA detected: 4.2
-- CUDA NVCC target flags: -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_20,code=compute_20;-gencode;arch=compute_30,code=compute_30
-- Found apache ant 1.8.2: /usr/bin/ant
-- General configuration for OpenCV 2.4.4 =====================================
--   Version control:               exported
--   Platform:
--     Host:                        Linux 3.2.0-4-amd64 x86_64
--     CMake:                       2.8.9
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 4.7)
--     C++ flags (Release):         -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     C Compiler:                  /usr/bin/gcc
--     C flags (Release):           -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
--   OpenCV modules:
--     To be built:                 core imgproc flann highgui features2d calib3d ml video objdetect contrib nonfree photo legacy gpu java python stitching ts videostab
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera ocl
--   GUI: 
--     QT 4.x:                      NO
--     GTK+ 2.x:                    YES (ver 2.24.10)
--     GThread :                    YES (ver 2.32.4)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--   Media I/O: 
--     ZLib:                        /usr/lib/x86_64-linux-gnu/ (ver 1.2.7)
--     JPEG:                        /usr/lib/x86_64-linux-gnu/ (ver 80)
--     PNG:                         /usr/lib/x86_64-linux-gnu/ (ver 1.2.49)
--     TIFF:                        /usr/lib/x86_64-linux-gnu/ (ver 42 - 3.9.6)
--     JPEG 2000:                   /usr/lib/x86_64-linux-gnu/ (ver 1.900.1)
--     OpenEXR:                     /usr/lib/ /usr/lib/ /usr/lib/ /usr/lib/ /usr/lib/ (ver 1.6.1)
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 ...
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-07-16 22:06:18 -0500

tirth gravatar image

It seems that ffmpeg is not installed

-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found

go to this link and install ffmpeg

or go this link

edit flag offensive delete link more

answered 2013-02-18 10:50:09 -0500

It looks like source code and build files conflict. Create build folder and run cmake from there like:

mkdir build
cd build
edit flag offensive delete link more


Did I do it right?

root@CMogilkoDebian:/home/cmogilko/sources/OpenCV-2.4.4# mkdir build

root@CMogilkoDebian:/home/cmogilko/sources/OpenCV-2.4.4# cd build

root@CMogilkoDebian:/home/cmogilko/sources/OpenCV-2.4.4/build# cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..


-- Build files have been written to: /home/cmogilko/sources/OpenCV-2.4.4

root@CMogilkoDebian:/home/cmogilko/sources/OpenCV-2.4.4/build# cd ..

root@CMogilkoDebian:/home/cmogilko/sources/OpenCV-2.4.4# make

same error

CMogilko gravatar imageCMogilko ( 2013-02-18 13:57:14 -0500 )edit

You need to call make from the build folder.

Guanta gravatar imageGuanta ( 2013-02-18 16:06:49 -0500 )edit

But there is no makefile in the build folder. There is ".." in cmake command. Am I need to use "."?

CMogilko gravatar imageCMogilko ( 2013-02-19 01:57:15 -0500 )edit

cmake creates your Makefiles but needs CMakesLists.txt. The command 'cmake -D MAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..' tells cmake to create Makefiles with the build-type in release mode and the install-prefix to be /usr/local and searches for the CMakeLists.txt in the upper folder (given by ..). It will create the Makefiles in the current folder. You can also use the curse-interface by using 'ccmake ..' (note the additional 'c') which let's adjust you more options and also generate you the appropriate make-files.

Guanta gravatar imageGuanta ( 2013-02-19 02:52:48 -0500 )edit

In my case, cmake seems create the make files source folder (..) instead of using the current folder.

Rui Marques gravatar imageRui Marques ( 2013-04-03 13:17:11 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-02-18 02:31:08 -0500

Seen: 3,936 times

Last updated: Jul 16 '16