| 233 | } |
| 234 | |
| 235 | FeatureKeypoints KeypointsFromMatrix( |
| 236 | const Eigen::Ref<const FeatureKeypointsMatrix>& keypoints) { |
| 237 | FeatureKeypoints feature_keypoints(keypoints.rows()); |
| 238 | for (Eigen::Index i = 0; i < keypoints.rows(); ++i) { |
| 239 | feature_keypoints[i] = FeatureKeypoint( |
| 240 | keypoints(i, 0), keypoints(i, 1), keypoints(i, 2), keypoints(i, 3)); |
| 241 | } |
| 242 | return feature_keypoints; |
| 243 | } |
| 244 | |
| 245 | FeatureMatchesMatrix MatchesToMatrix(const FeatureMatches& feature_matches) { |
| 246 | const size_t num_matches = feature_matches.size(); |