OpenCV: Installation




Here are the details for installing OpenCV. If you want save this post for reading it later, download the PDF from the link below.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Installing OpenCV 1.0

Download Executable from the link below:

The file will be present in the folders:
opencv-win
             > 1.0
                    > OpenCV_1.0.exe             18.0 Mb

Install the the package.

Visual Studio
Global Settings:
Include the directories of the OpenCV headers and OpenCV libraries into the Visual Studio.

Before opening any projects, open Tools from the menu bar and select Options.
In the Options window select VC++ Directories. Open Show the Directories for: and select Include files.

Now add the following paths where the OpenCV include files are present.
C:\Program Files\OpenCV\cv\include
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cvaux\include
C:\Program Files\OpenCV\otherlibs\_graphics\include

Similarly select Source files from Show the Directories for: option. Now add the path where the source files are present.
C:\Program Files\OpenCV\cv\src
C:\Program Files\OpenCV\cxcore\src
C:\Program Files\OpenCV\cvaux\src
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\otherlibs\_graphics\src

Similarly select Library files from Show the Directories for: option & add the path where library files are present.
C:\Program Files\OpenCV\lib

Click on OK to save the changes

Now all you have to do is create a new cpp project and add the following headers to your program -

  #include <cv.h>
  #include <cxcore.h>
  #include <highgui.h>

Project Settings:

Before building a project, Right click on the project and open Properties. Now click Linker and select Input. Type cxcore.lib cv.lib highgui.lib in to Additional Dependances.

Image:










No comments:

Post a Comment