February 14, 2012

Using OpenCV for Python in Windows

OpenCV stands for Open Computer Vision Library and can be used to process and transform images.

  • You can get the latest windows files here. I downloaded and extracted OpenCV-2.3.1-win-superpack.exe
  • After extracting the exe, copy the contents of C:\OpenCV-2.3.1-win-superpack\opencv\build\python\2.7 to C:\dev\Python27_32bit\Lib\site-packages\
  • After that, install numpy and scipy in your Python installation using easy_install

Now you are ready to test it. You can run this sample program that comes with OpenCV. Since the code points to a URL for building.jpg that is not there, you can point it to any other image URL on the web.