Point Cloud Library (PCL)
1.11.1
|
43 #include <pcl/registration/correspondence_rejection.h>
49 namespace registration
70 using Ptr = shared_ptr<CorrespondenceRejectorDistance>;
71 using ConstPtr = shared_ptr<const CorrespondenceRejectorDistance>;
76 rejection_name_ =
"CorrespondenceRejectorDistance";
106 template <
typename Po
intT>
107 PCL_DEPRECATED(1, 12,
"pcl::registration::CorrespondenceRejectorDistance::setInputCloud is deprecated. Please use setInputSource instead")
111 if (!data_container_)
113 static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputSource (cloud);
120 template <
typename Po
intT>
inline void
123 if (!data_container_)
125 static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputSource (cloud);
132 template <
typename Po
intT>
inline void
135 if (!data_container_)
137 static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputTarget (target);
152 setInputSource<PointXYZ> (cloud);
166 setInputTarget<PointXYZ> (cloud);
176 template <
typename Po
intT>
inline void
178 bool force_no_recompute =
false)
180 static_pointer_cast< DataContainer<PointT> >
181 (data_container_)->setSearchMethodTarget (tree, force_no_recompute );
193 getRemainingCorrespondences (*input_correspondences_, correspondences);
210 #include <pcl/registration/impl/correspondence_rejection_distance.hpp>
shared_ptr< CorrespondenceRejector > Ptr
DataContainerPtr data_container_
A pointer to the DataContainer object containing the input and target point clouds.
float distance(const PointT &p1, const PointT &p2)
shared_ptr< const CorrespondenceRejector > ConstPtr
void setInputSource(const typename pcl::PointCloud< PointT >::ConstPtr &cloud)
Provide a source point cloud dataset (must contain XYZ data!), used to compute the correspondence dis...
const std::string & getClassName() const
Get a string representation of the name of this class.
void setSearchMethodTarget(const typename pcl::search::KdTree< PointT >::Ptr &tree, bool force_no_recompute=false)
Provide a pointer to the search object used to find correspondences in the target cloud.
PointCloud represents the base class in PCL for storing collections of 3D points.
A point structure representing Euclidean xyz coordinates, and the RGB color.
~CorrespondenceRejectorDistance()
Empty destructor.
shared_ptr< KdTree< PointT, Tree > > Ptr
shared_ptr< DataContainerInterface > Ptr
virtual void setMaximumDistance(float distance)
Set the maximum distance used for thresholding in correspondence rejection.
void setSourcePoints(pcl::PCLPointCloud2::ConstPtr cloud2) override
Blob method for setting the source cloud.
#define PCL_DEPRECATED(Major, Minor, Message)
macro for compatibility across compilers and help remove old deprecated items for the Major....
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
DataContainer is a container for the input and target point clouds and implements the interface to co...
bool requiresTargetPoints() const override
See if this rejector requires a target cloud.
float max_distance_
The maximum distance threshold between two correspondent points in source <-> target.
void applyRejection(pcl::Correspondences &correspondences) override
Apply the rejection algorithm.
void setInputTarget(const typename pcl::PointCloud< PointT >::ConstPtr &target)
Provide a target point cloud dataset (must contain XYZ data!), used to compute the correspondence dis...
bool requiresSourcePoints() const override
See if this rejector requires source points.
shared_ptr< PointCloud< PointT > > Ptr
float getMaximumDistance() const
Get the maximum distance used for thresholding in correspondence rejection.
shared_ptr< const PointCloud< PointT > > ConstPtr
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.
CorrespondenceRejectorDistance()
Empty constructor.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
CorrespondenceRejectorDistance implements a simple correspondence rejection method based on threshold...
void setTargetPoints(pcl::PCLPointCloud2::ConstPtr cloud2) override
Method for setting the target cloud.
DataContainerInterface::Ptr DataContainerPtr
CorrespondencesConstPtr input_correspondences_
The input correspondences.
std::string rejection_name_
The name of the rejection method.
Defines functions, macros and traits for allocating and using memory.
CorrespondenceRejector represents the base class for correspondence rejection methods
void fromPCLPointCloud2(const pcl::PCLPointCloud2 &msg, pcl::PointCloud< PointT > &cloud, const MsgFieldMap &field_map)
Convert a PCLPointCloud2 binary data blob into a pcl::PointCloud<T> object using a field_map.