1. Download the openCV
OpenCv is available at http://sourceforge.net/projects/opencvlibrary/. For may project im using openCV 1.0. To download OpenCV 1.0 click 'View all Files' and then u can Download openCV 1.0 for windows.
2.Install Opencv
After install the openCV make sure that to set System Properties->Environment Variable-> Path to the bin folder in OpenCV
After that restart Your machine
Then go to ..OpenCV\samples\c folder.Then you can see lot of samples their.Try to run those samples.If those samples are run without an error your openCV installation is successful.
3. Opencv Configure with Visual Studio 2008
Create new Win32 Concole application.
Go to Properties
In the Project Properties Page go to Configuration Properties -> C/C++ ->General
To set 'Additional Include Directories' copy and paste the following text:
"C:\Program Files\OpenCV\cxcore\include";"C:\Program Files\OpenCV\cv\include\";"C:\Program Files\OpenCV\cvaux\include";"C:\Program Files\OpenCV\otherlibs\highgui"
Change above according to your installation path
Next Project Properties Page go to Configuration Properties -> Linker ->Inputs
To set 'Additional Dependencies' copy and paste following text:
"C:\Program Files\OpenCV\lib\cv.lib" "C:\Program Files\OpenCV\lib\cvaux.lib" "C:\Program Files\OpenCV\lib\cxcore.lib" "C:\Program Files\OpenCV\lib\highgui.lib"
In here is space separation, Instead of above semicolon (;) seperation
Now your all configuration is finish.Then you can copy source code from samples folder and and run in the Visual Studio 2008 environment