Step 1: Create a new project.

Step 2: Select Win32 Console Application

Step 3: We want an Empty project

Step 4: Done creating the project

Step 5: Create a new item

Step 6: Create a C++ file, the name is your choice.

Step 7: Modify the project properties

Step 7: Select All Configurations

Step 9: Go to Configuration Properties / C/C++ / General / Additional Include Directories

Step 10: Enter the path to your include files: For default OpenCV install location, they are
"C:\Program Files\OpenCV\cvaux\include\";"C:\Program Files\OpenCV\cxcore\include\";"C:\Program Files\OpenCV\cv\include\";"C:\Program Files\OpenCV\otherlibs\highgui\";"C:\Program Files\OpenCV\otherlibs\cvcam\include\"Step 11: Go to Configuration Properties / Linker / Input / Additional Dependencies
Enter the path to all the relevant cv libs. For a default install, this is:
"C:\Program Files\OpenCV\lib\cv.lib" "C:\Program Files\OpenCV\lib\cxcore.lib" "C:\Program Files\OpenCV\lib\cvaux.lib" "C:\Program Files\OpenCV\lib\highgui.lib"(notice the spaces instead of ; marks)
Guess what, you're done !!! Just write some sample code and start debugging. Happy openCVing !!!
Step 11: Go to Configuration Properties / Linker / Input / Additional Dependencies
Enter the path to all the relevant cv libs. For a default install, this is:
Guess what, you're done !!! Just write some sample code and start debugging. Happy openCVing !!!
September 18, 2009 at 3:20 am
Thanks for the quick and simple instructions to get this setup.
One other tip is that you can add the OpenCV lib directory in “Configuration Properties / Linker / General / Additional Include Directories” and then you only need to put the actual library in Step 11.