Point Cloud Library (PCL)
1.10.0
|
43 #include <pcl/registration/correspondence_rejection.h>
47 namespace registration
74 rejection_name_ =
"CorrespondenceRejectorDistance";
104 template <
typename Po
intT>
inline void
107 PCL_WARN (
"[pcl::registration::%s::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead.\n", getClassName ().c_str ());
108 if (!data_container_)
110 boost::static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputSource (cloud);
117 template <
typename Po
intT>
inline void
120 if (!data_container_)
122 boost::static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputSource (cloud);
129 template <
typename Po
intT>
inline void
132 if (!data_container_)
134 boost::static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputTarget (target);
149 setInputSource<PointXYZ> (cloud);
163 setInputTarget<PointXYZ> (cloud);
173 template <
typename Po
intT>
inline void
175 bool force_no_recompute =
false)
177 boost::static_pointer_cast< DataContainer<PointT> >
178 (data_container_)->setSearchMethodTarget (tree, force_no_recompute );
190 getRemainingCorrespondences (*input_correspondences_, correspondences);
207 #include <pcl/registration/impl/correspondence_rejection_distance.hpp>
shared_ptr< CorrespondenceRejector > Ptr
This file defines compatibility wrappers for low level I/O functions.
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.
~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.
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
DataContainer is a container for the input and target point clouds and implements the interface to co...
void setInputCloud(const typename pcl::PointCloud< PointT >::ConstPtr &cloud)
Provide a source point cloud dataset (must contain XYZ data!), used to compute the correspondence dis...
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
shared_ptr< const PointCloud< PointT > > ConstPtr
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
float getMaximumDistance()
Get the maximum distance used for thresholding in correspondence rejection.
CorrespondencesConstPtr input_correspondences_
The input correspondences.
std::string rejection_name_
The name of the rejection method.
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.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.