Using the old SWIG Python interface to OpenCV instead of the new one?

Bug #582919 reported by Vitorio Miliano
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description


I noticed that even though you're developing on Lucid, which includes OpenCV 2.x and the matching Python bindings, you're using the old (deprecated) SWIG bindings from 1.x instead. describes the differences. is the new interface.

Is there a reason for this?

(It may be worth noting that Lucid's version of the (deprecated) NumPy2PIL function makes those tests pass on Jaunty, so it's probably an OpenCV issue in that particular case.)

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

No, not great reason really. I'm using only three or four functions from OpenCV at this point, and I bet we can make it work with either version. I really wish that pyopencv was more widely adopted, though, since it seems to support a lot more of OpenCV's functinality, but that's an unrelated rambling.

Do you want to give that change a try?

If not, I'll try to have a quick look at it in the next few days.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Sorry, if it's not clear, I meat using the new interface of OpenCV, not pyopencv.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :


Changed in xpresser:
status: New → Triaged
status: Triaged → Confirmed
Revision history for this message
Ara Pulido (ara) wrote :

Take into account that, although Lucid includes OpenCV 2.0, the python bindings in Lucid are for 1.x.
There is a PPA for Lucid for the new bindings:

Revision history for this message
Tony Simpson (agjasimpson) wrote :

I looked at all the opencv wrappers available last night and decided ctypes-opencv was the best choice on windows, its available on pypi and supports 2.x and 3.x + has some very nice helper methods (like as_numpy_array on image). Seems to cover most of opencv. Didn't work out of the box with the current opencv windows download but fixing that was easy.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Ara, ah, that explains it, thanks.

Tony, agreed. I also found out that pyopencv seems to be the best bindings available, both in interface and in the range of the API supported, but I found it somewhat tricky to compile it against recent versions of opencv/etc. A couple of weeks ago I filed a few bugs in the tracker and have been talking to the author.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.