Saturday, April 3rd, 2010, 678 days ago
Quoted: Switching to OpenCV 2.0 with VS2005
I’m using OpenCV for some tests, and for some reasons (freelance gigs and Symbian SDK) using MS Visual Studio. As new and shiny OpenCV 2.0 is out I decided to switch to it. As it happen, one absolutely have to read buried in the download section readme, before doing anything.
The thing is, OpenCV 2.0 doesn’t include lib files for VS. They have to be built by user.
So here is step by step retelling of readme:
1. Rename your old OpenCV installation to save it, just in case
2. Download and install OpenCV 2.0a
3. Download and install CMake
4. Reboot (or CMake wouldn’t work)
5. Go to C:\Program Files\CMake 2.6\bin and run cmake-gui.exe
6. In the “Where is the source code” field choose your new OpenCV directory (C:\OpenCV)
In “Where to build the binaries” choose directory for VS compiled OpneCV (C:\OpenCV\VS2005)
7. press Configure button and choose VS2005 (or whatever) as building enviroment
8. Press Generate and VS project will be generated in the C:\OpenCV\VS2005
9. Launch solution and build it. For debug build some projects require debug python libraries. As riseriyo pointed in comments if you have Python installed other than 2.6 that can cause problem.
10. Copy *.lib from C:\OpenCV\vs2005\lib\release (or debug) to C:\OpenCV\lib
Copy *.dll from C:\OpenCV\vs2005\bin\release to C:\OpenCV\bin
11. Now, reconfigure your application project. Include directories now “C:\OpenCV\include\opencv” instead of “C:\OpenCV\include
12. All libraries renamed from *.lib to *200.lib (cv.lib to cv200.lib) or *200d.lib for debug. Rename them, or change project settings.
The post was posted originally in ‘Mirror Image‘, all copyrights reserved by original authors.
POSTS MAY BE OF INTEREST
- The error of ‘VIDIOC_QUERYMENU: Invalid argument’
- HIGHGUI ERROR: V4L: index 0 is not correct
- Capturing images from webcams using openCV in Ubuntu 11.04
- Fixing ‘[libavutil/libavutil.so.51] Error 1′ in ffmpeg make for openCV 2.3.1 install
- Installing openCV in Ubuntu with pandaboard part 5 – running openCV 2.3.1 examples
- Installing openCV in Ubuntu with pandaboard part 4 – compiling openCV 2.3.1
- Installing openCV in Ubuntu with pandaboard part 3 – the network proxy
- Installing openCV in Ubuntu with pandaboard part 2
- Installing openCV in Ubuntu with pandaboard part 1
- OpenCV mailing list – a collection of resources
- A review of people counting using openCV part 2
- A review of people counting using openCV part 1
- Using webcams/motion sensing cameras in OMAP-based pandaboard
- Doing openCV in pandaboard 3 – successful installation
- Doing openCV in Pandaboard 2 – installing ubuntu 11.04