OpenCV is very usefull library to develop professional and real time image/video processing applications. It was originally developed by Intel and therefore applications developed with OpenCV run very fast on Intel processors. I have recently started working with OpenCV and found it really great for implementation of Computer Vision advanced algorithms. This tutorial will explain the basic installation procedure of OpenCV library and how it can be integrated with Microsoft Visual Studio 2008.
- Download OpenCV2.0 from here
- Install to some folder for example C:\OpenCV2.0
- Now this ( C:\OpenCV2.0 ) folder contains source files for OpenCV. These source files need to be build for specific development environment which in our case is Microsoft Visual Studio 2008. CMake utility can be used to generate build files for Microsoft Visual Studio 2008.
- Download and Install CMake utility. downlaod here
- Open CMake and select the source directory for OpenCV source files i.e ( C:\OpenCV2.0). Select the build directory. for example C:\OpenCV2.0\Build.
- Once source and build directories are selected. Press Configure button and specify generator i.e Microsoft Visual Studio 9 (2008) and hit finish.
- Once you hit finish button CMake will read all source files and display all variables used in these files. All variables are displayed in red for the first time, press Configure again untill there are no red entries.
- Press Generate button and build files for Microsoft Visual Studio 2008 will be generated in C:\OpenCV2.0\Build.
- After Verifying that build files have been generated, start Microsoft Visual Studio 2008 and open solution C:\OpenCV2.0\Build\OpenCV.sln and build this solution, if build is successful it will generate required binaries of OpenCV and you are done.
Create your first OpenCV project and follow this tutorial to configure your project. I will explain this in my next tutorial on How to create and configure first OpenCV project.
Adnan Elahi Noon is a lecturer and member of COMVIS (Computer Vision Research Group) at COMSATS Lahore. He holds a masters degree in embedded digital systems from University of Sussex, United Kingdom.