Software needed to build OpenCV from sources

Building the OpenCV library from scratch requires a couple of tools installed beforehand.

Building tools

  • An IDE, or just a CC++ compiler that will actually make the binary files. Here we will use the Microsoft Visual Studio IDE.
  • CMake, which is a neat tool to make the project files (for your chosen IDE) from the OpenCV source files. It will also allow an easy configuration of the OpenCV build files, in order to make binary files that fits exactly to your needs.
  • Git to acquire the OpenCV source files. A good tool for this is GitHub for Windows. Alternatively, you can just download an archived version of the source files from the OpenCV page on Sourceforge.

Third-party libraries and software

OpenCV may come in multiple flavors. There is a “core” section that will work on its own. Nevertheless, there is a couple of tools, libraries made by 3rd parties that offer services of which the OpenCV may take advantage. These will improve its capabilities in many ways. In order to use any of them, you need to download and install them on your system.

Improving performance

  • Intel © Threading Building Blocks (TBB) is used inside OpenCV for parallel code snippets. Using this will make sure that the OpenCV library will take advantage of all the cores you have in your systems CPU.
  • Intel © Integrated Performance Primitives (IPP) may be used to improve the performance of color conversion, Haar training and DFT functions of the OpenCV library. Intel made it free to use with OpenCV 3.0 and later.
  • The latest CUDA Toolkit will allow you to use the power lying inside your GPU. This will drastically improve performance for some algorithms (e.g the HOG descriptor). Getting more and more of our algorithms to work on the GPUs is a constant effort of the OpenCV team.

Other 3rd-party libraries

  • OpenCV offers a somewhat fancier and more useful graphical user interface, than the default one by using the Qt framework. For a quick overview of what this has to offer look into the documentations highgui module, under the Qt New Functions section. Version 4.6 or later of the framework is required.
  • Numpy is a scientific computing package for Python which is required for the Python interface.
  • Eigen is a C++ template library for linear algebra.
  • OpenEXR source files are required for the library to work with this high dynamic range (HDR) image file format.
  • The OpenNI Framework contains a set of open source APIs that provide support for natural interaction with devices via methods such as voice command recognition, hand gestures and body motion tracking.