OpenCV under Windows

1 post / 0 new
piborg
piborg's picture
OpenCV under Windows

For those who are trying to run OpenCV under Windows you may have trouble installing things correctly.
The instructions on the OpenCV page are a bit out-of-date, this is our recommended installation procedure.

  1. Install Python 2.7 from http://python.org/ftp/python/2.7.5/python-2.7.5.msi
  2. Install the Numpy 1.10.2 superpack from https://sourceforge.net/projects/numpy/files/NumPy/1.10.2/numpy-1.10.2-w...
  3. Download OpenCV 2.4.13 from https://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.13/o...
  4. Run the opencv-2.4.13.exe program to extract all the files
  5. Find the extracted opencv\build\python\2.7\x86 folder
  6. Copy the cv2.pyd file into C:\Python27\Lib\site-packages
  7. Run Python from Start > All Programs > Python 2.7 > Python (command line)
  8. The version shown should be 2.7.5
  9. Run the following lines:
    import numpy
    print numpy.__version__
    import cv2
    print cv2.__version__
    
  10. The versions show should be 1.10.2 and 2.4.13

This should be everything needed to simulate the image processing in the Race Code.
Note that the functions have changed in newer versions of OpenCV and therefore versions of 3.0.0 and later will need some minor changes to the code.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: bash, cpp, perl, python.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Comment Images
Files must be less than 10 MB.
Allowed file types: png gif jpg jpeg.
Comment Attachments
Files must be less than 10 MB.
Allowed file types: txt pdf nfo doc docx rtf jpg png gif bmp zip tar gz csv xls.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.