mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Merge pull request #17977 from paroj:hervec
* calib3d: calibrateHandEye - allow using Rodrigues vectors for rotation * calib3d: calibrateHandEye - test rvec representation
This commit is contained in:
parent
a218cf3c61
commit
3c3e131c38
@ -712,7 +712,10 @@ void calibrateHandEye(InputArrayOfArrays R_gripper2base, InputArrayOfArrays t_gr
|
||||
{
|
||||
Mat m = Mat::eye(4, 4, CV_64FC1);
|
||||
Mat R = m(Rect(0, 0, 3, 3));
|
||||
R_gripper2base_[i].convertTo(R, CV_64F);
|
||||
if(R_gripper2base_[i].size() == Size(3, 3))
|
||||
R_gripper2base_[i].convertTo(R, CV_64F);
|
||||
else
|
||||
Rodrigues(R_gripper2base_[i], R);
|
||||
|
||||
Mat t = m(Rect(3, 0, 1, 3));
|
||||
t_gripper2base_[i].convertTo(t, CV_64F);
|
||||
@ -727,7 +730,10 @@ void calibrateHandEye(InputArrayOfArrays R_gripper2base, InputArrayOfArrays t_gr
|
||||
{
|
||||
Mat m = Mat::eye(4, 4, CV_64FC1);
|
||||
Mat R = m(Rect(0, 0, 3, 3));
|
||||
R_target2cam_[i].convertTo(R, CV_64F);
|
||||
if(R_target2cam_[i].size() == Size(3, 3))
|
||||
R_target2cam_[i].convertTo(R, CV_64F);
|
||||
else
|
||||
Rodrigues(R_target2cam_[i], R);
|
||||
|
||||
Mat t = m(Rect(3, 0, 1, 3));
|
||||
t_target2cam_[i].convertTo(t, CV_64F);
|
||||
|
@ -317,7 +317,10 @@ void CV_CalibrateHandEyeTest::simulateData(RNG& rng, int nPoses,
|
||||
t_gripper2base_noise.at<double>(2,0) += rng.gaussian(0.001);
|
||||
}
|
||||
|
||||
R_target2cam.push_back(T_target2cam(Rect(0, 0, 3, 3)));
|
||||
// test rvec represenation
|
||||
Mat rvec_target2cam;
|
||||
cv::Rodrigues(T_target2cam(Rect(0, 0, 3, 3)), rvec_target2cam);
|
||||
R_target2cam.push_back(rvec_target2cam);
|
||||
t_target2cam.push_back(T_target2cam(Rect(3, 0, 1, 3)));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user