Public bug reported:

Binary package hint: python-opencv

Using version 1.0.0-3ubuntu3 of python-opencv.

The documentation produced via "pydoc opencv.cv.cvCalibrateCamera2" is:
cvCalibrateCamera2(CvMat object_points, CvMat image_points, CvMat point_counts, 
CvSize image_size, CvMat intrinsic_matrix, CvMat rotation_vectors=None, CvMat 
translation_vectors=None, int flags=0)

As you can see it lists 8 arguments. However, when providing all 8, it raises 
the exception:
TypeError: cvCalibrateCamera2() takes at most 7 arguments (8 given)

Even when providing the bare minimum of arguments (5, according to pydoc) with 
all the matrices set up properly (in other words, exactly the same as a working 
version in C), it raises this error:
RuntimeError: openCV Error:
Status=Bad argument
function name=cvCalibrateCamera2
error message=the output array of rotation vectors must be 3-channel 1xn or nx1 
array or 1-channel nx3 or nx9 array, where n is the number of views
file_name=cvcalibration.cpp
line=1324

I have noticed that in C, the function prototype of cvCalibrateCamera2 includes 
an extra argument "distortion_coeffs":
void cvCalibrateCamera2( const CvMat* object_points, const CvMat* image_points, 
const CvMat* point_counts, CvSize image_size, CvMat* intrinsic_matrix, CvMat* 
distortion_coeffs, CvMat* rotation_vectors=NULL, CvMat* 
translation_vectors=NULL, int flags=0 );

Could it be that the mapping from Python arguments to C arguments is
ill-defined?

** Affects: opencv (Ubuntu)
     Importance: Undecided
         Status: New

-- 
cvCalibrateCamera2 broken in python-opencv
https://bugs.launchpad.net/bugs/188539
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to