Installation Of OpenCV 2.1 on Ubuntu
Gijs Molenaar has build OpenCV 2.1 packages for Ubuntu Lucid and Karmic. You don't need to compile OpenCV anymore if you use these packages, except for when you want something special like enable IPP. Jaunty packages are also available but not updated anymore.
To install OpenCV 2.1 on Ubuntu run these commands:
$ sudo add-apt-repository ppa:gijzelaar/opencv2 $ sudo apt-get update $ sudo apt-get install opencv
To install the development files run:
$ sudo apt-get install libopencv-dev
If you want to install the Python module:
$ sudo apt-get install python-opencv
If you want to install the documentation:
$ sudo apt-get install opencv-doc
Main differences to the normal Ubuntu OpenCV package:
- 2.1
- new Python API is enabled
- Used CMake to build
- Cmake file is included
- Python Numpy enabled
- TBB enabled
- Most optimisation flags enabled (sse2, sse3)
- libcv4, libhighgui4 and libcvaux4 are replaced by the package libopencv0
- libcv-dev, libhighgui-dev and libcvaux-dev are replaced by libopencv-dev
- There is a new package named opencv which contains the training binaries. This package depends on the libraries, so it also acts as a sort of meta package.
Notes:
- Since SSE2 and SSE3 are enabled you are not able to run it on older hardware.
- Debian people can use the source deb stuff to build a debian package
- Older Ubuntu versions probably also work with this (source) package
- If installing the opencv package shows an error "opencv: Depends: libopencv0 but it is not going to be installed" try installing libopencv0 manually first.
(On Ubuntu 10.04 I had to compile ffmpeg and openCV manually to enable video capturing. Ralph Glass)