opencv install help on linux

Asked by ZW

Hi All

We have Oracle Enterprise linux 5. (64 bit)
We downloaded opencv from http://opencv.org/downloads.html, unzip and untar it and list shows

[root@host OpenCV-2.2.0]# ls -lrt
total 176
-rw-r--r-- 1 srajput staff 4318 Dec 4 2010 cvconfig.h.cmake
-rwxr-xr-x 1 srajput staff 1129 Dec 4 2010 cmake_uninstall.cmake.in
-rw-r--r-- 1 srajput staff 55684 Dec 4 2010 CMakeLists.txt
-rw-r--r-- 1 srajput staff 35 Dec 4 2010 README
-rw-r--r-- 1 srajput staff 3426 Dec 4 2010 Package.cmake.in
-rw-r--r-- 1 srajput staff 10477 Dec 4 2010 OpenCVPCHSupport.cmake
-rwxr-xr-x 1 srajput staff 695 Dec 4 2010 opencv.pc.cmake.in
-rw-r--r-- 1 srajput staff 2684 Dec 4 2010 OpenCVModule.cmake
-rw-r--r-- 1 srajput staff 9319 Dec 4 2010 OpenCVInstallRequiredSystemLibraries.cmake
-rw-r--r-- 1 srajput staff 15648 Dec 4 2010 OpenCVFindPkgConfig.cmake
-rw-r--r-- 1 srajput staff 1794 Dec 4 2010 OpenCVFindOpenEXR.cmake
-rw-r--r-- 1 srajput staff 2847 Dec 4 2010 OpenCVFindLATEX.cmake
-rw-r--r-- 1 srajput staff 5752 Dec 4 2010 OpenCVConfig.cmake.in
drwxr-xr-x 8 root root 4096 Mar 6 10:43 tests
drwxr-xr-x 7 root root 4096 Mar 6 10:43 samples
drwxr-xr-x 18 root root 4096 Mar 6 10:43 modules
drwxr-xr-x 4 root root 4096 Mar 6 10:43 include
drwxr-xr-x 8 root root 4096 Mar 6 10:43 doc
drwxr-xr-x 4 root root 4096 Mar 6 10:43 data
drwxr-xr-x 5 root root 4096 Mar 6 10:43 android
drwxr-xr-x 10 root root 4096 Mar 6 10:43 3rdparty

How do we go from here to install ?
We don't see any source directory to compile.

Other method: yum install opencv (does not work)
[rrr@host Sikuli-IDE]$ sudo yum install opencv
No package opencv available.
Nothing to do

Any help is appreciated to help us make progress with it.

Sincerely

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Leonardo Shiguemi Dinnouti (leonardo-dinnouti) said :
#1

I think the right place to download OpenCV is from http://sourceforge.net/projects/opencvlibrary/files/?source=navbar
Compiling instructions can be found in http://opencv.willowgarage.com/wiki/InstallGuide.

But, even following these steps, when compiling version 2.2 in my Ubuntu 12.04, I stopped at:
OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp:469:13: error: ‘CODEC_TYPE_VIDEO’ was not declared in this scope

(Before that I added a lot of "#include <stddef.h>" to overcome some "ptrdiff_t" related error)

Revision history for this message
RaiMan (raimund-hocke) said :
#2

OpenCV uses cmake as build tool.

When using cake, it is always recommended, to NOT run the cmake command in the OpenCV root folder.

--- the basic approach:
mkdir build
cd build
cmake ..
make
sudo make install

which would install the stuff in the respective folders at /usr/local

If you want to influence the installation somehow: try to get ccmake (curses cmake gui) or even cmake-gui (gtk based) to have a visual access to the possible build options.

The above ffmpeg related error: if you do not have ffmpeg on the machine and do not plan to use it for video capture, just set the above constant to a syntactically correct value, so it compiles without errors.

Revision history for this message
j (j-the-k) said :
#3

I tried to compile opencv 2.1/2.2 a lot of times on my ubuntu machine, but failed everytime because of some compile errors, at the end I downloaded the .deb package from the ubuntu repository.

Can you help with this problem?

Provide an answer of your own, or ask ZW for more information if necessary.

To post a message you must log in.