| 1 | #include "semantic_teaser.h" |
| 2 | |
| 3 | void semanticTeaser::solve(const Eigen::MatrixX3d &src, |
| 4 | const Eigen::MatrixX3d &tgt) { |
| 5 | culculate_correspondence(src, tgt); |
| 6 | |
| 7 | this->matched_src_ = this->initial_correspondences.points.first; |
| 8 | this->matched_tgt_ = this->initial_correspondences.points.second; |
| 9 | |
| 10 | // this->initial_correspondences = *correspondences; |
| 11 | |
| 12 | this->solver.solve(this->initial_correspondences.points.first, |
| 13 | this->initial_correspondences.points.second); |
| 14 | |
| 15 | // extract solution |
| 16 | auto solution = this->solver.getSolution(); |
| 17 | this->solution_ = Eigen::Matrix4d::Identity(); |
| 18 | this->solution_.block<3, 3>(0, 0) = solution.rotation; |
| 19 | this->solution_.block<3, 1>(0, 3) = solution.translation; |
| 20 | |
| 21 | this->max_clique_ = this->solver.getInlierMaxClique(); |
| 22 | } |
| 23 | |
| 24 | void semanticTeaser::solve_for_multiclass( |
| 25 | std::vector<pcl::PointCloud<pcl::PointXYZ>> &src_cloud_vec, |
no test coverage detected