Installing OpenCV Under Windows

You will need administrator access to install OpenCV!

Windows users need only run the executable to get access to the libraries from within Windows, just make sure you tick the check box that adds the OpenCV bin directory to the system path during installation.

OpenCV for Windows assumes that you have Borland C++, Eclipse or MS Visual Studio (either .NET or version 6.0) installed. All of them take the same parameters for the libraries but the option panes to enter these are, naturally, in different places for each program.
There's an excellent wiki explaining how to set these up, and it can be found here. However, the necessary settings can take a while to find and so I've put them here for ease of use.


Assuming you have installed OpenCV into C:/Program Files/OpenCV, the settings you require are:

Additional Include Directories: "C:\Program Files\OpenCV\cxcore\include";
"C:\Program Files\OpenCV\cv\include";
"C:\Program Files\OpenCV\cvaux\include";
"C:\Program Files\OpenCV\otherlibs\highgui";
"C:\Program Files\OpenCV\otherlibs\cvcam\include"
Additional Library Directories: "C:\Program Files\OpenCV\lib"
Additional Dependencies (libraries): cv.lib cxcore.lib highgui.lib

If you get the message "This application has failed to start because cv099.dll was not found" then there are two possible reasons. Either you simply haven't restarted since installing OpenCV (and need to do so before it'll work) or your PATH settings are incorrect. This usually happens if you weren't the user who installed OpenCV.

To change your PATH settings, right-click 'My Computer', click 'Properties' and look at the 'Advanced' tab. There you will see a button marked 'Environment Variables' - click it. In the window that then appears, look for the PATH option in the lower list of the two presented. Find the directory containing cv099.dll (if you don't know it already) and add that folder's location after the last entry in PATH, usually separated using a semicolon (;).