Ask Your Question

ormapper's profile - activity

2015-08-21 17:40:58 -0600 received badge  Nice Answer (source)
2015-03-13 04:04:34 -0600 received badge  Student (source)
2015-03-13 04:04:23 -0600 received badge  Teacher (source)
2013-11-04 11:25:53 -0600 received badge  Self-Learner (source)
2013-03-15 08:19:08 -0600 received badge  Editor (source)
2013-03-15 08:14:55 -0600 answered a question Error with cv2.stereoRectify

I figured this out. It wasn't my distCoeffs at all but the order I had the parameters in cv2.stereoRectify.

As the cv2 version appears to be undocumented as of yet, I was following the syntax for cv.StereoRectify and the parameter order is different.

cv2.stereoRectify: (cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, ...) cv.StereoRectify: (cameraMatrix1, cameraMatrix2, distCoeffs1, distCoeffs2, imageSize, ...)

2013-03-08 13:42:04 -0600 asked a question Error with cv2.stereoRectify

I'm getting the following error when trying to implement cv2.stereoRectify:

error: C:\slave\WinInstallerMegaPack\src\opencv\modules\imgproc\src\undistort.cpp:292: error: (-215) CV_IS_MAT(_distCoeffs) && (_distCoeffs->rows == 1 || _distCoeffs->cols == 1) && (_distCoeffs->rows_distCoeffs->cols == 4 || _distCoeffs->rows_distCoeffs->cols == 5 || _distCoeffs->rows*_distCoeffs->cols == 8)

My distCoeffs array looks like this:

[[-0.00716872 -0.02469766  0.00481753 -0.00261278]]

Is something wrong with it? In case it matters, I'm running OpenCV 2.44