Ask Your Question

Revision history [back]

Different Linux distributions provide prebuilt binary libraries of OpenCV packages as part of their standard package repositories.

OpenCV's prebuilt libraries may be prerequisites to running other prebuilt high-level application packages. For example, the digikam application package depends on opencv's core library package, so if you install digikam's prebuilt package, the package system will also will install opencv's core library.

A given distribution may split out major functional areas of opencv as separate but related packages (Debian and Ubuntu, for example, split the OpenCV library into core, calib3d, contrib, features2d, flann, highgui, imgproc, legacy, ml, objdetect, photo, and video packages).

For Fedora Linux, OpenCV is installed with packages with names starting "opencv". For example, see http://docs.opencv.org/master/dd/dd5/tutorial_py_setup_in_fedora.html in the OpenCV tutorials.

To list available prebuilt Fedora packages, type:

  dnf search opencv

To download and install all Fedora opencv packages, type:

  dnf install opencv*

Debian and derived distributions (like Ubuntu) also package prebuilt opencv as binaries. To find the names of available packages on your system, type:

  apt-cache search opencv

To install a package and its prerequisite libraries:

  apt-get install python-opencv

If all you needed were, for example, the calib3d and core packages, then you could instead install just those (this example runs on Ubuntu 14.04 and its prebuilt port of OpenCV 2.4.8+dfsg1):

  apt-get install libopencv-calib3d2.4 libopencv-core2.4