|
22 | 22 | #include "teaser/geometry.h" |
23 | 23 |
|
24 | 24 | // TODO: might be a good idea to template Eigen::Vector3f and Eigen::VectorXf such that later on we |
25 | | -// can decide to use doulbe if we want. Double vs float might give nontrivial differences.. |
| 25 | +// can decide to use double if we want. Double vs float might give nontrivial differences.. |
26 | 26 |
|
27 | 27 | namespace teaser { |
28 | 28 |
|
@@ -283,7 +283,7 @@ class GNCTLSRotationSolver : public GNCRotationSolver { |
283 | 283 | * For more information, please see the original paper on FGR: |
284 | 284 | * Q.-Y. Zhou, J. Park, and V. Koltun, “Fast Global Registration,” in Computer Vision – ECCV 2016, |
285 | 285 | * Cham, 2016, vol. 9906, pp. 766–782. |
286 | | - * Notice that our implementation differ from the paper on the estimation of T matrix. We |
| 286 | + * Notice that our implementation differs from the paper on the estimation of T matrix. We |
287 | 287 | * only estimate rotation, instead of rotation and translation. |
288 | 288 | * |
289 | 289 | */ |
@@ -317,7 +317,7 @@ class FastGlobalRegistrationSolver : public GNCRotationSolver { |
317 | 317 | /** |
318 | 318 | * Use Quatro to solve for pairwise registration problems avoiding degeneracy |
319 | 319 | * |
320 | | - * For more information, please see the original paper on FGR: |
| 320 | + * For more information, please see the original paper on Quatro: |
321 | 321 | * H. Lim et al., "A Single Correspondence Is Enough: Robust Global Registration |
322 | 322 | * to Avoid Degeneracy in Urban Environments," in Robotics - ICRA 2022, |
323 | 323 | * Accepted. To appear. arXiv:2203.06612 [cs], Mar. 2022. |
@@ -714,12 +714,31 @@ class RobustRegistrationSolver { |
714 | 714 | } |
715 | 715 |
|
716 | 716 | /** |
717 | | - * Return inliers from rotation estimation |
| 717 | + * Return inliers from translation estimation |
718 | 718 | * |
719 | | - * @return a vector of indices of measurements deemed as inliers by rotation estimation |
| 719 | + * @return a vector of indices of measurements deemed as inliers by translation estimation |
720 | 720 | */ |
721 | 721 | inline std::vector<int> getTranslationInliers() { return translation_inliers_; } |
722 | 722 |
|
| 723 | + /** |
| 724 | + * Return input-ordered inliers from translation estimation |
| 725 | + * |
| 726 | + * @return a vector of indices of given input correspondences deemed as inliers |
| 727 | + * by translation estimation. |
| 728 | + */ |
| 729 | + inline std::vector<int> getInputOrderedTranslationInliers() { |
| 730 | + if (params_.rotation_estimation_algorithm == ROTATION_ESTIMATION_ALGORITHM::FGR) { |
| 731 | + throw std::runtime_error( |
| 732 | + "This function is not supported when using FGR since FGR does not use max clique."); |
| 733 | + } |
| 734 | + std::vector<int> translation_inliers; |
| 735 | + translation_inliers.reserve(translation_inliers_.size()); |
| 736 | + for (const auto& i : translation_inliers_) { |
| 737 | + translation_inliers.emplace_back(max_clique_[i]); |
| 738 | + } |
| 739 | + return translation_inliers; |
| 740 | + } |
| 741 | + |
723 | 742 | /** |
724 | 743 | * Return a boolean Eigen row vector indicating whether specific measurements are inliers |
725 | 744 | * according to translation measurements. |
|
0 commit comments