Using OpenCV 3.0.0alpha with CMake in Windows 7

Hi all,
I was just curious about how much effort would take to download, install and try the OpenCV 3.0.0alpha version that has been around for a little while ( The motivation is that it looks that we will have soon a beta version, and perhaps a release version somewhere at the end of 2014 or beginning of 2015. I will definitely like to have acostumed myself to whatever changes OpenCV 3.0 implies compared to OpenCV 2.X.

Downloading OpenCV from git repository
So the first thing is downloading this version, and the suggested way to do it is with the git repository. So you need to install the git tool if you do not have it already. You can download it from here:
During installation I left everything default and created an user and password. Once done, you have a Git bash application from which you can type the download commands. Actually, the first time, in git, this is called “cloning” the repository. You can do it from here:

I also downloaded the extras path: git://
And the contrib folder, which contains the contributions from external contributors (appart from itseez):

Building OpenCV with CMake
With CMake you can very easily build OpenCV in your system. You can follow any previous tutorial to do so (like the one I did some time ago). If you are unfamiliar with CMake, please consider it a must if you are interested in programming computer vision applications.

Using OpenCV 3.0.0alpha in your projects

First thing, is that the name of the CMake list variable that holds the paths to the include directories has changed from ${OPENCV_INCLUDE_DIRS} to ${OpenCV_INCLUDE_DIRS}. Yes, well, not a big change, but here I had my first problem until I realised what was happening.

The second problem was that some OpenCV macros has been moved to new files so I had to search for them and #include the files. For instance, you would probably need to include the following:

#include "opencv2/imgproc/imgproc_c.h" // for CV_RGB
#include "opencv2/videoio/videoio_c.h" // for CV_CAP_PROP_FRAME_WIDTH, etc. when capturing a video

I also got the strange problem that the ippicv.lib library was not found, even if there were no warnings nor problems at config time. This is something I will investigate later. Just removed this ippicv.lib from the Linker menu in Visual Studio and everything worked just fine.

Excited about discovering the new features of OpenCV 3.0.0alpha!



This entry was posted in CMake, Computer vision, OpenCV and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s