| 1047 | namespace { |
| 1048 | |
| 1049 | void ExtractInlierImagePoints(const std::vector<Eigen::Vector2d>& points1, |
| 1050 | const std::vector<Eigen::Vector2d>& points2, |
| 1051 | const FeatureMatches& inlier_matches, |
| 1052 | std::vector<Eigen::Vector2d>* inlier_points1, |
| 1053 | std::vector<Eigen::Vector2d>* inlier_points2) { |
| 1054 | inlier_points1->resize(inlier_matches.size()); |
| 1055 | inlier_points2->resize(inlier_matches.size()); |
| 1056 | for (size_t i = 0; i < inlier_matches.size(); ++i) { |
| 1057 | (*inlier_points1)[i] = points1[inlier_matches[i].point2D_idx1]; |
| 1058 | (*inlier_points2)[i] = points2[inlier_matches[i].point2D_idx2]; |
| 1059 | } |
| 1060 | } |
| 1061 | |
| 1062 | // Fits the E/F/H matrix matching `geometry->config` from the existing |
| 1063 | // inlier matches when it was not persisted in the database (e.g. databases |
no test coverage detected