Are distortion coefficients returned by cv::stereoCalibrate correct?
// This bug is fixed by Pritam Shete(http://code.opencv.org/projects/opencv/repository/revisions/a430abd02eaf38e0d42f075acbb47210c2b191c8)
Hi,
I tried to use cv::stereoCalibrate to calibrate the cameras. However the distortion coefficients returned by cv::stereoCalibrate seemed to be wrong. I didn't set up the flag "CALIB_THIN_PRISM_MODEL"(I passed CV_CALIB_RATIONAL_MODEL as the flag), but I still got the nonzero s1, s2, s3, and s4 in returned array.
Is this correct result?
In calibration.cpp - line#2038, I thought distCoeffs->cols == 12, and Dist[k] had only 8 component. Why there is no code setting the last 4 components in distortion coefficients to zero?
The distortion coefficients I got are
distCoeffs1:[k_1_A, k_2_A, p_1_A, p_2_A, k_3_A, k_4_A, k_5_A, k_6_A, k_1_B, k_2_B, p_1_B, p_2_B]
distCoeffs2:[k_1_B, k_2_B, p_1_B, p_2_B, k_3_B, k_4_B, k_5_B, k_6_B, ?, ?, ?, ?]
As StevenPuttemans always says, dont use hashtags in the tags. Although they get proposed, they create doubles and make forum search harder.
Refer to OpenCv documentation on Camera calibration - http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html
Please see the equations before watching the code, they would give you logical explanation of the camera calibration process.
Thank you. I had read the documentation. I don't know why the last four components(s_1, s_2, s_3, s_4) returned by cv::stereoCalibrate are nonzero when I only pass CV_CALIB_RATIONAL_MODEL as "flag". Are those four components are effective when I pass CALIB_THIN_PRISM_MODEL to cv::stereoCalibrate. Or should I set those components in 12-element distortion coefficients to zero by myself before calling initUndistortRectifyMap?