43 #include <pcl/registration/correspondence_rejection.h>
46 namespace registration {
67 using Ptr = shared_ptr<CorrespondenceRejectorTrimmed>;
68 using ConstPtr = shared_ptr<const CorrespondenceRejectorTrimmed>;
84 overlap_ratio_ = std::min(1.0f, std::max(0.0f, ratio));
92 return overlap_ratio_;
105 nr_min_correspondences_ = min_correspondences;
112 return nr_min_correspondences_;
131 getRemainingCorrespondences(*input_correspondences_, correspondences);
135 float overlap_ratio_{0.5f};
138 unsigned int nr_min_correspondences_{0};
CorrespondenceRejector represents the base class for correspondence rejection methods
shared_ptr< const CorrespondenceRejector > ConstPtr
CorrespondencesConstPtr input_correspondences_
The input correspondences.
const std::string & getClassName() const
Get a string representation of the name of this class.
shared_ptr< CorrespondenceRejector > Ptr
std::string rejection_name_
The name of the rejection method.
CorrespondenceRejectorTrimmed implements a correspondence rejection for ICP-like registration algorit...
void setMinCorrespondences(unsigned int min_correspondences)
Set a minimum number of correspondences.
float getOverlapRatio() const
Get the maximum distance used for thresholding in correspondence rejection.
unsigned int getMinCorrespondences() const
Get the minimum number of correspondences.
~CorrespondenceRejectorTrimmed() override=default
Destructor.
void getRemainingCorrespondences(const pcl::Correspondences &original_correspondences, pcl::Correspondences &remaining_correspondences) override
Get a list of valid correspondences after rejection from the original set of correspondences.
virtual void setOverlapRatio(float ratio)
Set the expected ratio of overlap between point clouds (in terms of correspondences).
CorrespondenceRejectorTrimmed()
Empty constructor.
void applyRejection(pcl::Correspondences &correspondences) override
Apply the rejection algorithm.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences