pyopencv_to functions fail (Bug #808)


Added by Jason Hirata about 14 years ago. Updated almost 14 years ago.


Status:Done Start date:
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:python bindings
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

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.


Associated revisions

Revision 30f9710d
Added by Alexander Mordvintsev almost 14 years ago

fixed #808 and #848

Revision 36028bd8
Added by Andrey Kamaev almost 12 years ago

Merge pull request #808 from bitwangyaoyao:2.4_mac

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

Also available in: Atom PDF