40 #ifndef PCL_REGISTRATION_CORRESPONDENCE_REJECTION_MEDIAN_DISTANCE_H_
41 #define PCL_REGISTRATION_CORRESPONDENCE_REJECTION_MEDIAN_DISTANCE_H_
43 #include <pcl/registration/correspondence_rejection.h>
44 #include <pcl/point_cloud.h>
48 namespace registration
68 typedef boost::shared_ptr<CorrespondenceRejectorMedianDistance>
Ptr;
69 typedef boost::shared_ptr<const CorrespondenceRejectorMedianDistance>
ConstPtr;
73 : median_distance_ (0)
77 rejection_name_ =
"CorrespondenceRejectorMedianDistance";
96 template <
typename Po
intT>
inline void
108 template <
typename Po
intT>
inline void
111 PCL_WARN (
"[pcl::registration::%s::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead.\n", getClassName ().c_str ());
112 if (!data_container_)
121 template <
typename Po
intT>
inline void
124 if (!data_container_)
136 template <
typename Po
intT>
inline void
138 bool force_no_recompute =
false)
141 (data_container_)->setSearchMethodTarget (tree, force_no_recompute );
163 getRemainingCorrespondences (*input_correspondences_, correspondences);
183 #include <pcl/registration/impl/correspondence_rejection_median_distance.hpp>
185 #endif // PCL_REGISTRATION_CORRESPONDENCE_REJECTION_MEDIAN_DISTANCE_H_
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
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...
double factor_
The factor for correspondence rejection.
DataContainerPtr data_container_
A pointer to the DataContainer object containing the input and target point clouds.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
CorrespondenceRejectorMedianDistance implements a simple correspondence rejection method based on thr...
boost::shared_ptr< const CorrespondenceRejectorMedianDistance > ConstPtr
double getMedianFactor() const
Get the factor used for thresholding in correspondence rejection.
boost::shared_ptr< CorrespondenceRejectorMedianDistance > Ptr
CorrespondenceRejectorMedianDistance()
Empty constructor.
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...
CorrespondenceRejector represents the base class for correspondence rejection methods ...
DataContainer is a container for the input and target point clouds and implements the interface to co...
std::string rejection_name_
The name of the rejection method.
double getMedianDistance() const
Get the median distance used for thresholding in correspondence rejection.
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...
void setMedianFactor(double factor)
Set the factor for correspondence rejection.
CorrespondencesConstPtr input_correspondences_
The input correspondences.
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
const std::string & getClassName() const
Get a string representation of the name of this class.
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...
double median_distance_
The median distance threshold between two correspondent points in source <-> target.
boost::shared_ptr< DataContainerInterface > DataContainerPtr
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...