Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

strange stereorectify error with rotation matrix

Hi,

I am doing stereo rectification using calibration data for a stereo pair in standard form (intrinsics as 3x3 Mat, distortions as 5x1 Mat, Rotation as 3x3 Mat and Translation as 3x1 Mat). But I keep getting the following exception

OpenCV Error: Formats of input arguments do not match (All the matrices must have 
the same   data type) in cvRodrigues2, 
file /build/buildd/opencv-2.3.1/modules/calib3d/src/calibration.cpp,  line 507 
terminate called after throwing an instance of 'cv::Exception' what():  
/build/buildd/opencv-2.3.1/modules/calib3d/src/calibration.cpp:507: error: (-205) 
All the matrices must have the same data type in function cvRodrigues2

Here is the calibration data http://pastebin.com/uGLzjYqx

I call stereorectify with the following

cv::stereoRectify(ints_left_, ints_right_, dtcs_left_, dtcs_right_, 
          cv::Size(640, 480), rotation_, translation_, 
          homography_left_, homography_right_, 
          rppm_left_, rppm_right_, qmat_);

Thanks