diff --git a/modules/calib3d/src/calibration_handeye.cpp b/modules/calib3d/src/calibration_handeye.cpp index 25fa5af053..ab20597c8b 100644 --- a/modules/calib3d/src/calibration_handeye.cpp +++ b/modules/calib3d/src/calibration_handeye.cpp @@ -722,7 +722,11 @@ void calibrateHandEye(InputArrayOfArrays R_gripper2base, InputArrayOfArrays t_gr if(R_gripper2base_[i].size() == Size(3, 3)) R_gripper2base_[i].convertTo(R, CV_64F); else - Rodrigues(R_gripper2base_[i], R); + { + cv::Mat R_temp; + Rodrigues(R_gripper2base_[i], R_temp); + R_temp.convertTo(R, CV_64F); + } Mat t = m(Rect(3, 0, 1, 3)); t_gripper2base_[i].convertTo(t, CV_64F); @@ -740,7 +744,11 @@ void calibrateHandEye(InputArrayOfArrays R_gripper2base, InputArrayOfArrays t_gr if(R_target2cam_[i].size() == Size(3, 3)) R_target2cam_[i].convertTo(R, CV_64F); else - Rodrigues(R_target2cam_[i], R); + { + cv::Mat R_temp; + Rodrigues(R_target2cam_[i], R_temp); + R_temp.convertTo(R, CV_64F); + } Mat t = m(Rect(3, 0, 1, 3)); t_target2cam_[i].convertTo(t, CV_64F); @@ -920,7 +928,9 @@ void calibrateRobotWorldHandEye(InputArrayOfArrays R_world2cam, InputArrayOfArra } else { - Rodrigues(rot, R); + cv::Mat R_temp; + Rodrigues(rot, R_temp); + R_temp.convertTo(R, CV_64F); R_base2gripper_.push_back(R); } Mat tvec = t_base2gripper_tmp[i]; @@ -938,7 +948,9 @@ void calibrateRobotWorldHandEye(InputArrayOfArrays R_world2cam, InputArrayOfArra } else { - Rodrigues(rot, R); + cv::Mat R_temp; + Rodrigues(rot, R_temp); + R_temp.convertTo(R, CV_64F); R_world2cam_.push_back(R); } Mat tvec = t_world2cam_tmp[i];