40 #ifndef PCL_REGISTRATION_CORRESPONDENCE_REJECTION_DISTANCE_H_ 41 #define PCL_REGISTRATION_CORRESPONDENCE_REJECTION_DISTANCE_H_ 43 #include <pcl/registration/correspondence_rejection.h> 47 namespace registration
68 typedef boost::shared_ptr<CorrespondenceRejectorDistance>
Ptr;
69 typedef boost::shared_ptr<const CorrespondenceRejectorDistance>
ConstPtr;
75 rejection_name_ =
"CorrespondenceRejectorDistance";
105 template <
typename Po
intT>
inline void 108 PCL_WARN (
"[pcl::registration::%s::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead.\n", getClassName ().c_str ());
109 if (!data_container_)
118 template <
typename Po
intT>
inline void 121 if (!data_container_)
130 template <
typename Po
intT>
inline void 133 if (!data_container_)
150 setInputSource<PointXYZ> (cloud);
164 setInputTarget<PointXYZ> (cloud);
174 template <
typename Po
intT>
inline void 176 bool force_no_recompute =
false)
179 (data_container_)->setSearchMethodTarget (tree, force_no_recompute );
191 getRemainingCorrespondences (*input_correspondences_, correspondences);
208 #include <pcl/registration/impl/correspondence_rejection_distance.hpp> 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...
DataContainer is a container for the input and target point clouds and implements the interface to co...
void setSearchMethodTarget(const boost::shared_ptr< pcl::search::KdTree< PointT > > &tree, bool force_no_recompute=false)
Provide a pointer to the search object used to find correspondences in the target cloud...
This file defines compatibility wrappers for low level I/O functions.
virtual void setMaximumDistance(float distance)
Set the maximum distance used for thresholding in correspondence rejection.
CorrespondenceRejector represents the base class for correspondence rejection methods ...
boost::shared_ptr< CorrespondenceRejectorDistance > Ptr
float getMaximumDistance()
Get the maximum distance used for thresholding in correspondence rejection.
boost::shared_ptr< DataContainerInterface > DataContainerPtr
bool requiresTargetPoints() const
See if this rejector requires a target cloud.
const std::string & getClassName() const
Get a string representation of the name of this class.
DataContainerPtr data_container_
A pointer to the DataContainer object containing the input and target point clouds.
void setSourcePoints(pcl::PCLPointCloud2::ConstPtr cloud2)
Blob method for setting the source cloud.
bool requiresSourcePoints() const
See if this rejector requires source points.
float max_distance_
The maximum distance threshold between two correspondent points in source <-> target.
CorrespondenceRejectorDistance()
Empty constructor.
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
float distance(const PointT &p1, const PointT &p2)
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
void setTargetPoints(pcl::PCLPointCloud2::ConstPtr cloud2)
Method for setting the target cloud.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
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...
CorrespondenceRejectorDistance implements a simple correspondence rejection method based on threshold...
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...
CorrespondencesConstPtr input_correspondences_
The input correspondences.
std::string rejection_name_
The name of the rejection method.
virtual ~CorrespondenceRejectorDistance()
Empty destructor.
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...
boost::shared_ptr< const CorrespondenceRejectorDistance > ConstPtr