tags:

views:

653

answers:

4

Where can i get OpenCV for python?What are the pre-requisites?? i tried to install opencv-python through synaptic package manager but Python says

No module named CVtypes

A: 

Tried the official website? http://opencv.willowgarage.com/wiki/Welcome

kb
i found the link for opencv library at sourceforge,but does it include libraries for python?
appusajeev
+2  A: 

CVTypes is a third party implementation that essentially wraps python around objects written in C, the language that OpenCV is written in (along with C++). If you want to use that, you will have to download and install it separately, as it is not part of the standard repositories of Ubuntu's Synaptic package manager that I know of at this time (I assume you are on Ubuntu because you mentioned 'Synaptic', Ubuntu's package manager).

However, there is an official python interface for OpenCV that is included in the OpenCV SVN repository and build packages. When installing version 1.0 from the package manager in Ubuntu, the python modules will be installed in the following directory:

/usr/lib/pymodules/python2.6/opencv

Ensure that is part of your PYTHONPATH environment variable and you should be able to import the modules as such:

from opencv.cv import *
from opencv.highgui import *
mipata
+1  A: 

OpenCV over time has accumulated numerous Python bindings, mostly due to the strange way arrays are represented in OpenCV (IMHO). Here is a short list:

Choose which one you want to use and keep it consistent and upto date. I personally prefer the classic WillowGarage version[listed last] over its fancier cousins since it has most development and test muscle behind it.

whatnick