Integrating with OpenCV
OpenCV is a very powerful open-source library for computer vision. The library is written in C++ so it can be easily integrated in your Cinder application. There is a very useful OpenCV Cinder block provided within Cinder package available at the GitHub repository (https://github.com/cinder/Cinder-OpenCV).
Getting ready
Make sure you have Xcode up and running with a Cinder project opened.
How to do it…
We will add OpenCV Cinder block to your project, which also illustrates the usual way of adding any other Cinder block to your project. Perform the following steps to do so:
Add a new group to our Xcode project root and name it
Blocks.
Next, drag theopencv
folder inside theBlocks
group. Be sure to select the Create groups for any added folders radio button, as shown in the following screenshot:You will need only the
include
folder inside theopencv
folder in your project structure, so delete any reference to others. The final project structure should look like the following...