In this section, we will see how to install OpenCV on Mac OS X. Precompiled binaries are not available for Mac OS X, so we need to compile OpenCV from scratch.
Before we proceed, we need to install CMake. If you don't already have CMake installed, you can download it from here: https://cmake.org/files/v3.12/cmake-3.12.0-rc1-Darwin-x86_64.dmg. It's a .dmg file, so once you download it, just run the installer.
Download the latest version of OpenCV from opencv.org. The current version is 4.0.0, and you can download it from here: https://github.com/opencv/opencv/archive/4.0.0.zip. Unzip the contents into a folder of your choice.
OpenCV 4.0.0 also has a new package called opencv_contrib, containing user contributions that are not yet ...