| 1008 | } |
| 1009 | |
| 1010 | FeatureKeypoints NormalizeFeatureKeypoints(const Camera& camera, |
| 1011 | const FeatureKeypoints& keypoints) { |
| 1012 | FeatureKeypoints normalized_keypoints(keypoints.size()); |
| 1013 | for (size_t i = 0; i < keypoints.size(); ++i) { |
| 1014 | const FeatureKeypoint& keypoint = keypoints[i]; |
| 1015 | if (const auto cam_point = |
| 1016 | camera.CamFromImg(Eigen::Vector2d(keypoint.x, keypoint.y))) { |
| 1017 | normalized_keypoints[i] = FeatureKeypoint(cam_point->x(), cam_point->y()); |
| 1018 | } else { |
| 1019 | // Set to large values to ensure that associated matches are rejected. |
| 1020 | normalized_keypoints[i] = FeatureKeypoint(1e6f, 1e6f); |
| 1021 | } |
| 1022 | } |
| 1023 | return normalized_keypoints; |
| 1024 | } |
| 1025 | |
| 1026 | double ComputeNormalizedGuidedMatchingMaxResidual(const Camera& camera1, |
| 1027 | const Camera& camera2, |
no test coverage detected