pyopencv_to functions fail (Bug #808)
Description
when invoking the opencv2 interface in python, particular methods that usually take as arguments a cv::Size or cv::Point, which now should take python tuples, fail with the error
SystemError: old style getargs format uses new features
One example that this occurs on is cv.circle(img, center, radius, color).
ex.
import numpy
import cv
image = numpy.ndarray( (640, 480) )
cv.circle(image, None, 10, (255,) ) # this is okay
cv.circle(image, (10,10), 10, (255,) ) # this fails
Looking at the source code, calling PyArg_Parse seems to cause the failure when the format string is "ii".
I get the same errors with both Python2.6 and Python2.7.
History
Updated by James Bowman about 14 years ago
Confirmed the problem. This is a bug in the new C++ bindings, passing to Vadim. I suggest there is a testing hole here.
jmhirata, to use the C binding use the method with a capital C:
cv.Circle(image, (10,10), 10, (255,) )
- Status deleted (
Open)
Updated by Alexander Mordvintsev almost 14 years ago
fixed in SVN trunk, rev. 5116
- Status set to Done
- (deleted custom field) set to fixed