1. Download Opencv-2.4.9.exe
The following address can be used thunderbolt:
http://downloads.sourceforge.net/project/opencvlibrary/opencv-win/2.4.9/opencv-2.4.9.exe?r=http%3A%2F% 2fsourceforge.net%2fprojects%2fopencvlibrary%2ffiles%2fopencv-win%2f2.4.9%2f&ts=1409995259&use_mirror= iweb
2. Execute Opencv-2.4.9.exe, the decompression path is assumed to be E:\LHK-WORK\OPENCV
If your VC version is one of the 10,11,12, you can directly use the compiled library in the installation package, the path is BUILD/X86/VC10 or Build/x86/vc11 or BUILD/X86/VC12, users with 64-bit system development Please select build/ X64/VC10 or Build/x64/vc11 or BUILD/X64/VC12, this article ends.
If your VC version is vs2008 (VC9) or lower, or you must generate the library file yourself, continue to the next section.
3. Download CMake-3.0.1
Choose one of the following downloads, and I'll take the second.
Http://www.cmake.org/files/v3.0/cmake-3.0.1-win32-x86.zip
The installation file is in the address
Http://www.cmake.org/files/v3.0/cmake-3.0.1-win32-x86.exe
4. Generate vs2008, i.e. VC9 project file
Having CMakeLists.txt under E:\lhk-work\opencv\sources means that the CMake tool can be used to generate a project file that is appropriate for your current installation of the VC version.
Execute Cmake\install\path\cmake-gui.exe, select the path containing the CMakeLists.txt as the source path, select Build/x86/vc9 as the project file path, if you use 64-bit platform, select build/x64/ The VC9 path is reasonable.
I use the 32-bit windows+ vs2008, which is vc9-32bit, so select "Visual Studio 9 2008", if you use 64-bit system VS2008, select "Visual Studio 9 Win 64", and so on.
5. Open Build/x86/vc9/opencv.sln project file, use batch all compile, should execute 2 times, first time because of the library dependency problem will have some no link success, the second time after the completion of the basic can be all generated. I have only NIS module not generated, not yet understand the detailed reasons, but do not hinder our initial understanding of learning this library.
VS2008 compiled OpenCV library under Windows