when running stereo calibration, the process fails with an OpenCV exception after outputting “stereo rectification matrix”.
Environment:
Jetson AGX Orin (ARM64)
Argus Capture 1.1.0, OpenCV 4.13.0-dev
2x ZED X One cameras
3840x2160 @ 25 fps
Checkerboard 15x10, square size 70 mm
Result:
Reprojection error: Left 0.3381, Right 0.3491, Stereo 0.3967
Log:
* Stereo rectification matrix
0.00360482
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.13.0-dev) /usr/local/include/opencv4/opencv2/core/mat.inl.hpp:899:
error: (-215:Assertion failed) (unsigned)(i1 * DataType<_Tp>::channels) <
(unsigned)(size.p[1] * channels()) in function 'at'
Could you advise on a fix or confirm if this is a known issue? I can share the full log if needed.
But as soon as I try to save the distortion parameters, another exception is thrown after outfile << "k4 = " << distortion_left.at<double>(5) << "\n";):
terminate called after throwing an instance of ‘cv::Exception’what(): OpenCV(4.13.0-dev) /usr/local/include/opencv4/opencv2/core/mat.inl.hpp:942: error: (-215:Assertion failed) (unsigned)i0 < (unsigned)(size.p[0] * size.p[1]) in function ‘at’
After printing the vectors, I noticed that distortion_left and distortion_right both have only five entries instead of eight k1,…k6