Chapter 2. Introduction to OpenCV

After installing the OpenCV library, our first task is, naturally, to get started and make something interesting happen. In order to do this, we will need to set up the programming environment.

In Visual Studio, it is necessary to create a project and to configure the setup so that (a) the libraries highgui.lib, cxcore.lib, ml.lib, and cv.lib are linked[8] and (b) the preprocessor will search the OpenCV …/opencv/*/include directories for header files. These "include" directories will typically be named something like C:/program files/opencv/cv/include,[9] …/opencv/cxcore/include, …/opencv/ml/include, and …/opencv/otherlibs/highgui. Once you've done this, you can create a new C file and start your first program.