Recently I held a course on video processing with Python and OpenCV, and I used the following instructions for installation. On my system, 64 bit Win7, and Python 2.7 (and the system of the conference organizers) these procedures worked reliably.
Install Python
==============
**Comment:**
This performs the basic Python installation, with all common toolboxes. As it
comes with OpenCV2.4.2 (and some of the applications there don't work for me)
we will skip the OpenCV package, and install it manually afterwards. Note that
this will take some time!
- Download "Python(x,y)-2.7.5.0.exe" from
https://code.google.com/p/pythonxy/wiki/Downloads- install Python(x,y), Version 2.7.5.0 as follows:
- first choose the "Full" option
- then unselect "OpenCV2.4.2"
Install OpenCV
==============
**Comment:**
This installs most of the functionality of OpenCV, including codecs required
to evaluate videos. Since the display of images still causes trouble
afterwards, we will replace some libraries with those from another build
below.
- From "
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv" download
"opencv-python-2.4.6.win32-py2.7.exe", and run it.
Update some OpenCV-libraries
============================
**Comment:**
At least on my computer, I had to do this to display images properly. In a
pinch, this step could be skipped, and "imshow" from Matplotlib could be used
for the display of images. OpenCV also worked properly form me when I
re-compiled OpenCV by hand - but this takes quite a bit of time.
- Download
http://sourceforge.net/projects/opencvlibrary/files/latest/download?source=files - Run "OpenCV-2.4.6.0.exe", and unzip them e.g. to "C:\" (this will create an
"openCV" directory there)
- Copy all files from "C:\openCV\build\x86\vc10\bin" to
"C:\Python27\Lib\site-packages" (overwrite existing files)
- Copy "C:\openCV\build\python\2.7\cv2.pyd" to "C:\Python27\Lib\site-packages"
- If you are very short of space, you can delete the extracte "C:\openCV"
directory now, as it takes up almost 3 GB of space. If you have the space,
keep it for the moment, as it has some good sample files.