Installing the Contrib modules
Unlike with OpenCV 2.4, some modules are contained in a repository called opencv_contrib
, which is available at https://github.com/Itseez/opencv_contrib. I highly recommend installing these modules as they contain extra functionalities that are not included in OpenCV, such as the face recognition module.
Once downloaded (either through zip
or git
, I recommend git
so that you can keep up to date with a simple git pull
command), you can rerun your cmake
command to include the building of OpenCV with the opencv_contrib
modules as follows:
cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
So, if you've followed the standard procedure and created a build directory in your OpenCV download folder, you should run the following command:
mkdir build && cd build cmake -D CMAKE_BUILD_TYPE=Release -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules -D CMAKE_INSTALL_PREFIX=/usr/local .. make