python projectPoints doesn't allow null or empty distCoeffs (Bug #1718)


Added by Dan Lazewatsky almost 13 years ago. Updated about 12 years ago.


Status:Done Start date:2012-03-26
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

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

Description

According to the documentation, setting distCoeffs to null or empty should cause distortion coefficients to be assumed. However, in python, using None raises an assertion error:

/OpenCV-2.3.1/modules/core/src/matrix.cpp:272: error: (-215) 0 <= colRange.start && colRange.start <= colRange.end && colRange.end <= m.cols in function Mat

and using array([]) complains that the distortion coefficients are the wrong shape:
OpenCV-2.3.1/modules/calib3d/src/calibration.cpp:882: error: (-5) Distortion coefficients must be 1x4, 4x1, 1x5, 5x1, 1x8 or 8x1 floating-point vector in function cvProjectPoints2


projectPointsBug.py (312 Bytes) Dan Lazewatsky, 2012-03-26 07:33 pm


Associated revisions

Revision abd9675a
Added by Vadim Pisarevsky about 12 years ago

fixed bugs #1718, #2375; attached the new tests to test.py.

Revision 2f4d68c7
Added by Roman Donchenko over 11 years ago

Merge pull request #1718 from SpecLad:have-opencv-ocl

History

Updated by Dan Lazewatsky almost 13 years ago

Example attached

  • File projectPointsBug.py added

Updated by Vadim Pisarevsky over 12 years ago

  • Target version deleted ()

Updated by Kirill Kornyakov over 12 years ago

  • Target version set to Next Hackathon

Updated by Vadim Pisarevsky about 12 years ago

  • Affected version set to 2.4.3
  • Target version deleted (Next Hackathon)

Updated by Vadim Pisarevsky about 12 years ago

  • Assignee set to Vadim Pisarevsky

Updated by Andrey Kamaev about 12 years ago

Fix is pushed to 2.4

  • Status changed from Open to Done

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF