conversion from PIL image to OpenCV image fails
Bug #398925 reported by
Zak Stone
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenCV |
Unknown
|
Unknown
|
|||
opencv (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-opencv
The following method of setting the data of an OpenCV image fails with version 1.0.0-6.1ubuntu1 of libcv1 and python-opencv:
image = cv.cvCreateImag
image.imageData = data # set some data
In particular, this breaks the conversion from PIL images to OpenCV images in adaptors.py. I believe this issue has been corrected in more recent versions of OpenCV -- many helpful details about the problem are available here:
http://
Thanks,
Zak
Changed in opencv (Ubuntu): | |
status: | New → Confirmed |
To post a comment you must log in.
The bug is known upstream (at http:// sourceforge. net/support/ tracker. php?aid= 1618474) and is fixed in upstream CVS (at http:// opencvlibrary. cvs.sourceforge .net/opencvlibr ary/opencv/ interfaces/ swig/python/ imagedata. i?r1=1. 3&r2=1. 4).
The patch from CVS is attached below. It applies without problems, but apparently the _cv.cpp file which is generated by Swig is not regenerated automatically. Adding --with-swig to the "configure" flags (for example in debian/rules, at the end of "confflags = " line) is a workaround for this.