Ask Your Question
4

How to install OpenCV under Windows

asked 2012-11-27 05:49:53 -0600

Jan gravatar image

I downloaded http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.3/

and extracted files, but there is NO bin directory, as DOC says. Is there any other way, how to install 2.4.3 version under windows? Thank you

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
5

answered 2012-12-06 17:57:47 -0600

khounslo gravatar image

Hi there, I made a YouTube tutorial on how to install v2.4.3 using precompiled libraries. Many people have found it useful. Click here

edit flag offensive delete link more

Comments

1

We can add this video to the official OpenCV channel, if you can send it to us. Very good work!

AlexanderShishkov gravatar imageAlexanderShishkov ( 2012-12-07 03:29:03 -0600 )edit

i was struggling but this answer is very helpful

atom217 gravatar imageatom217 ( 2012-12-10 14:54:31 -0600 )edit
3

answered 2012-11-27 06:27:30 -0600

Daniil Osokin gravatar image

updated 2012-11-27 06:29:04 -0600

Hi! You should use this path for bin folder:

"opencv\build\{platform_type}\{compiler_type}"
e.g. "opencv\build\x86\vc10". OpenCV tracker has a ticket about this misunderstanding.

edit flag offensive delete link more
2

answered 2012-11-27 06:22:56 -0600

aliciadominica gravatar image

Here is how I installed it, be advised you need CMake and Visual Studio 2008 for this installation:

Extract the OpenCV files to a simple directory like: C:\OpenCV243 (that's what I use) Assuming you extracted the files to C:\OpenCV243 directory;

  • There should be a folder called "opencv" inside C:\OpenCV243, Copy everything inside the "opencv" folder to C:\OpenCV243 and delete the "opencv" folder.

  • Run CMAKE and type C:\OpenCV243 to source code box and type C:\OpenCV243\cnf to build the binaries part. It will ask you if you want to create a folder called "C:\OpenCV243\cnf" click yes.

  • It will then ask you which ide you want to use for building the solution with, select VS 9 2008.

  • It will list all of the projects etc. select the ones you want to build in a solution. Make sure you select the box "Install C Examples" to get the sample codes which are VERY helpful.

  • First Configure and then Generate.

  • Now you should find a file called "OpenCV.sln" in C:\OpenCV243\cnf. Open this file and build it in Debug configuration. And then build it in Release configuration.

  • There are 2 folders under the C:\OpenCV243\cnf directory called "lib" and "bin". Copy those to C:\OpenCV243 directory.

  • Copy folders under C:\OpenCV243\build\include to C:\OpenCV243\include

  • Copy the dll files in C:\OpenCV243\bin\Release and C:\OpenCV243\bin\Debug to C:\Windows\System32

  • Right Click on Computer, Select Properties and then click on "Advanced System Settings", Click on environment variables, add a new environment variable called PATH and add those directories to that variable: C:\OpenCV243\bin\Debug;C:\OpenCV243\bin\Release;C:\OpenCV243\bin NOTE: You might not need this as you already copied dll files but I would still do it anyway.

  • Now open VS 9 2008 and create a new windows 32 console application.

  • Go to Tools-->Options-->Project and Solutions On the right corner you should see a box titled "Show the directories for" Select Include files and add C:\OpenCV243\include, C:\OpenCV243\include\opencv, C:\OpenCV243\include\opencv2

  • Select "Library" under the same menu ("show directories for") and add C:\OpenCV243\lib\Debug C:\OpenCV243\lib\Release

  • Select "Executable Files" and add the $PATH to the list. Save and close the options window

  • Right click on the project and select "Properties", Go to Linker-->Input and while in Debug configuration add following libraries: opencv_calib3d243d.lib opencv_contrib243d.lib opencv_core243d.lib opencv_features2d243d.lib opencv_flann243d.lib opencv_gpu243d.lib opencv_haartraining_engined.lib opencv_highgui243d.lib opencv_imgproc243d.lib opencv_legacy243d.lib opencv_ml243d.lib opencv_nonfree243d.lib opencv_objdetect243d.lib opencv_photo243d.lib opencv_stitching243d.lib opencv_ts243d.lib opencv_video243d.lib opencv_videostab243d.lib

switch to Release configuration and add following libraries--> opencv_calib3d243.lib opencv_contrib243.lib opencv_core243.lib opencv_features2d243.lib opencv_flann243.lib opencv_gpu243.lib opencv_haartraining_engine.lib opencv_highgui243.lib opencv_imgproc243.lib opencv_legacy243.lib opencv_ml243.lib opencv_nonfree243.lib opencv_objdetect243.lib opencv_photo243.lib opencv_stitching243.lib opencv_ts243.lib opencv_video243.lib opencv_videostab243.lib

Note that you might not need all those libraries for your ... (more)

edit flag offensive delete link more
1

answered 2012-11-27 06:11:20 -0600

SR gravatar image

updated 2012-11-28 02:35:18 -0600

There is actually a guide that explains how to use the pre-built libraries. There is no installer yet and no explicit installation needed. That guide also explains how to build OpenCV from source.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-27 05:49:53 -0600

Seen: 1,796 times

Last updated: Dec 06 '12