Ask Your Question
2

Problems following the Windows installation tutorial with 2.4.2

asked 2012-11-01 09:40:35 -0600

sgranade gravatar image

updated 2012-11-01 10:12:46 -0600

I'm needing to use OpenCV on Windows and was intending to follow the instructions to install the pre-built binaries from

http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html

As instructed, I went to the SourceForge page (http://sourceforge.net/projects/opencvlibrary/files/opencv-win/) and downloaded OpenCV-2.4.2.exe from http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.2/. The instructions say to "Start the setup and follow the wizard." However, the .exe file is just a 7-zip self-extracting archive. All it does is unzip the OpenCV archive. After unpacking the archive there's no setup.exe or similar program.

Can anyone point me at what I'm missing?

EDIT: The MD5 hash of that .exe file doesn't match the given MD5 hash in checksum.txt. The downloaded file's hash is 6282b0a95f1d4258ba74cbcbca1f3d28. I've re-downloaded the file twice and re-verified the same (wrong?) hash.

Also the same thing happens with 2.4.3. The hash is wrong, and it is only a self-extracting 7-zip archive.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2012-11-01 12:22:05 -0600

muhammet_Ali gravatar image

There is no executable file in package.You need to move unpacked files to C:/OpenCV ( or wherever you want ). After that if you want to use VS C++ , you need same make arrangements.When it is needed you can show path of include files like this : WhereYouSaved/opencv/include/bin etc.

edit flag offensive delete link more

Comments

I'm confronting the same issue as sgranade. In addition to what he describes, the further issue is found in setting the path. The path is supposed to be set to e.g. D:\OpenCV\Build\Install. However, there is no "Install" directory inside the Build directory.

Any further thoughts?

(See: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html?highlight=installation#windowssetpathandenviromentvariable)

bwilfley gravatar imagebwilfley ( 2012-11-07 11:22:30 -0600 )edit

with all due respect, the tutorials are very lengthy and hard to follow, i think. video intro usually does a much better job. for people who actually needs to look at the tutorials, mostly likely they are not fishing for the advanced/fancier set up, or explanations on how things work. we just want an easy, extremely trimmed-down, step-by-step, dumb guide to start the most basic helloworld first. i just want something that works initially, and maybe that is all i need.

Carpenter gravatar imageCarpenter ( 2012-11-07 23:05:57 -0600 )edit

You a right, to set OpenCV environment variable you should use path like this: "D:\OpenCV\Build\<platform_type>\<compiler_type>", e.g. "D:\OpenCV\Build\x64\vc10". Documentation will be improved. If you really need a video with quick installation process, you can submit a feature to code.opencv.org or write new question about this.

Daniil Osokin gravatar imageDaniil Osokin ( 2012-11-16 02:21:15 -0600 )edit
0

answered 2013-03-09 03:42:18 -0600

Pontifex gravatar image

I had the same problems; and spent ~3 hours trial & error until I finally found this solution that was successful:

I have posted a very simple method to install OpenCV 2.4 for Python in Windows here : Install OpenCV in Windows for Python

It is just as simple as copy and paste. Hope it will be useful for future viewers.

  1. Download Python, Numpy, OpenCV from their official sites.
  2. Extract OpenCV (will be extracted to a folder opencv)
  3. Copy ..\opencv\build\python\x86\2.7\cv2.pyd and paste it in C:\Python27\Lib\site-packages
  4. (Re-)Open Python IDLE or terminal, and type >>> import cv2

If no errors shown, it is OK.

edit flag offensive delete link more

Comments

Instead of step 3 you can also add PYTHONPATH which points to that path to your system-variables.

Guanta gravatar imageGuanta ( 2013-03-09 05:49:13 -0600 )edit
0

answered 2012-11-07 16:21:06 -0600

sgranade gravatar image

updated 2012-11-08 15:44:29 -0600

The Windows installation tutorial I linked to in my question is out of date. Here's a modified set of instructions.

  • Extract the OpenCV files by running the OpenCV .exe (a self-extracting 7-zip file) to a directory where you'd like them to live.
  • Set the OPENCV_DIR as described in the Windows install instructions to point at the top of the OpenCV directory structure.
  • Set the path to point to the pre-built DLLs. They're in the opencv\build\[xNN]\[compiler]\bin directory, where [xNN] is x86 for 32-bit applications or x64 for 64-bit applications, and [compiler] is mingw (for MinGW), vc9 (for Visual Studio 2008) or vc10 (for Visual Studio 2010).

If I were installing to the D: drive to write applications for 64-bit Windows using Visual Studio 2010, I'd set OPENCV_DIR to be D:\opencv and I'd add D:\opencv\build\x64\vc10\bin to my path.

I still don't know what's up with the MD5 hash, though.

edit flag offensive delete link more

Comments

in opencv\build[xNN][compiler] there is no \bin directory. opencv2.4.2

Carpenter gravatar imageCarpenter ( 2012-11-07 23:14:42 -0600 )edit

and how do i set up compiler in VS please?

Carpenter gravatar imageCarpenter ( 2012-11-07 23:15:13 -0600 )edit

The editor here ate my backslashes. That should be "opencv \ build \ [xNN] \ [compiler]". I've fixed my comment above.

sgranade gravatar imagesgranade ( 2012-11-08 15:46:41 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2012-11-01 09:40:35 -0600

Seen: 2,602 times

Last updated: Mar 09 '13