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 ...

Get Learning OpenCV 3 Computer Vision with Python - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.