small_gicp
rejector.hpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright 2024 Kenji Koide
2 // SPDX-License-Identifier: MIT
3 #pragma once
4 
5 #include <Eigen/Core>
6 #include <Eigen/Geometry>
7 
8 namespace small_gicp {
9 
11 struct NullRejector {
12  template <typename TargetPointCloud, typename SourcePointCloud>
13  bool operator()(const TargetPointCloud& target, const SourcePointCloud& source, const Eigen::Isometry3d& T, size_t target_index, size_t source_index, double sq_dist) const {
14  return false;
15  }
16 };
17 
21 
22  template <typename TargetPointCloud, typename SourcePointCloud>
23  bool operator()(const TargetPointCloud& target, const SourcePointCloud& source, const Eigen::Isometry3d& T, size_t target_index, size_t source_index, double sq_dist) const {
24  return sq_dist > max_dist_sq;
25  }
26 
27  double max_dist_sq;
28 };
29 
30 } // namespace small_gicp
Definition: flat_container.hpp:12
Rejecting correspondences with large distances.
Definition: rejector.hpp:19
bool operator()(const TargetPointCloud &target, const SourcePointCloud &source, const Eigen::Isometry3d &T, size_t target_index, size_t source_index, double sq_dist) const
Definition: rejector.hpp:23
double max_dist_sq
Maximum squared distance between corresponding points.
Definition: rejector.hpp:27
DistanceRejector()
Definition: rejector.hpp:20
Null correspondence rejector. This class accepts all input correspondences.
Definition: rejector.hpp:11
bool operator()(const TargetPointCloud &target, const SourcePointCloud &source, const Eigen::Isometry3d &T, size_t target_index, size_t source_index, double sq_dist) const
Definition: rejector.hpp:13