|
|
|
@ -322,10 +322,12 @@ TEST(Calib3d_SolvePnPRansac, input_type) |
|
|
|
|
|
|
|
|
|
std::vector<cv::Point3f> points3d; |
|
|
|
|
std::vector<cv::Point2f> points2d; |
|
|
|
|
for (int i = 0; i < numPoints; i++) |
|
|
|
|
for (int i = 0; i < numPoints; i+=2) |
|
|
|
|
{ |
|
|
|
|
points3d.push_back(cv::Point3i(i, 0, 0)); |
|
|
|
|
points2d.push_back(cv::Point2i(i, 0)); |
|
|
|
|
points3d.push_back(cv::Point3i(5+i, 3, 2)); |
|
|
|
|
points3d.push_back(cv::Point3i(5+i, 3+i, 2+i)); |
|
|
|
|
points2d.push_back(cv::Point2i(0, i)); |
|
|
|
|
points2d.push_back(cv::Point2i(-i, i)); |
|
|
|
|
} |
|
|
|
|
Mat R1, t1, R2, t2, R3, t3, R4, t4; |
|
|
|
|
|
|
|
|
@ -359,12 +361,16 @@ TEST(Calib3d_SolvePnP, double_support) |
|
|
|
|
std::vector<cv::Point2d> points2d; |
|
|
|
|
std::vector<cv::Point3f> points3dF; |
|
|
|
|
std::vector<cv::Point2f> points2dF; |
|
|
|
|
for (int i = 0; i < 10 ; i++) |
|
|
|
|
for (int i = 0; i < 10 ; i+=2) |
|
|
|
|
{ |
|
|
|
|
points3d.push_back(cv::Point3d(i,0,0)); |
|
|
|
|
points3dF.push_back(cv::Point3d(i,0,0)); |
|
|
|
|
points2d.push_back(cv::Point2d(i,0)); |
|
|
|
|
points2dF.push_back(cv::Point2d(i,0)); |
|
|
|
|
points3d.push_back(cv::Point3d(5+i, 3, 2)); |
|
|
|
|
points3dF.push_back(cv::Point3d(5+i, 3, 2)); |
|
|
|
|
points3d.push_back(cv::Point3d(5+i, 3+i, 2+i)); |
|
|
|
|
points3dF.push_back(cv::Point3d(5+i, 3+i, 2+i)); |
|
|
|
|
points2d.push_back(cv::Point2d(0, i)); |
|
|
|
|
points2dF.push_back(cv::Point2d(0, i)); |
|
|
|
|
points2d.push_back(cv::Point2d(-i, i)); |
|
|
|
|
points2dF.push_back(cv::Point2d(-i, i)); |
|
|
|
|
} |
|
|
|
|
Mat R,t, RF, tF; |
|
|
|
|
vector<int> inliers; |
|
|
|
|