| 337 | } |
| 338 | |
| 339 | void CorrespondenceGraph::UpdateTwoViewGeometry( |
| 340 | const image_t image_id1, |
| 341 | const image_t image_id2, |
| 342 | struct TwoViewGeometry two_view_geometry) { |
| 343 | const image_pair_t pair_id = ImagePairToPairId(image_id1, image_id2); |
| 344 | auto image_pair_it = image_pairs_.find(pair_id); |
| 345 | THROW_CHECK(image_pair_it != image_pairs_.end()); |
| 346 | FeatureMatches().swap(two_view_geometry.inlier_matches); |
| 347 | if (ShouldSwapImagePair(image_id1, image_id2)) { |
| 348 | two_view_geometry.Invert(); |
| 349 | } |
| 350 | image_pair_it->second.two_view_geometry = std::move(two_view_geometry); |
| 351 | } |
| 352 | |
| 353 | bool CorrespondenceGraph::IsTwoViewObservation( |
| 354 | const image_t image_id, const point2D_t point2D_idx) const { |