39 #ifndef PCL_REGISTRATION_CORRESPONDENCE_REJECTION_VAR_TRIMMED_H_
40 #define PCL_REGISTRATION_CORRESPONDENCE_REJECTION_VAR_TRIMMED_H_
42 #include <pcl/registration/correspondence_rejection.h>
43 #include <pcl/point_cloud.h>
49 namespace registration
71 typedef boost::shared_ptr<CorrespondenceRejectorVarTrimmed>
Ptr;
72 typedef boost::shared_ptr<const CorrespondenceRejectorVarTrimmed>
ConstPtr;
76 trimmed_distance_ (0),
83 rejection_name_ =
"CorrespondenceRejectorVarTrimmed";
102 template <
typename Po
intT>
inline void
105 if (!data_container_)
114 template <
typename Po
intT>
inline void
117 PCL_WARN (
"[pcl::registration::%s::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead.\n", getClassName ().c_str ());
118 if (!data_container_)
127 template <
typename Po
intT>
inline void
130 if (!data_container_)
142 template <
typename Po
intT>
inline void
144 bool force_no_recompute =
false)
147 (data_container_)->setSearchMethodTarget (tree, force_no_recompute );
184 getRemainingCorrespondences (*input_correspondences_, correspondences);
218 inline float optimizeInlierRatio (std::vector <double> &dists);
223 #include <pcl/registration/impl/correspondence_rejection_var_trimmed.hpp>
225 #endif // PCL_REGISTRATION_CORRESPONDENCE_REJECTION_VAR_TRIMMED_H_
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 trimmed_distance_
The inlier distance threshold (based on the computed trim factor) between two correspondent points in...
double getTrimFactor() const
Get the computed inlier ratio used for thresholding in correspondence rejection.
CorrespondenceRejectorVarTrimmed()
Empty constructor.
double lambda_
part of the term that balances the root mean square difference.
double getTrimmedDistance() const
Get the trimmed distance used for thresholding in correspondence rejection.
double getMinRatio() const
brief get the minimum overlap ratio
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...
CorrespondencesConstPtr input_correspondences_
The input correspondences.
CorrespondenceRejector represents the base class for correspondence rejection methods ...
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...
void setMinRatio(double ratio)
brief set the minimum overlap ratio
double max_ratio_
The maximum overlap ratio between the input and target clouds.
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...
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
DataContainerPtr data_container_
A pointer to the DataContainer object containing the input and target point clouds.
double getMaxRatio() const
brief get the maximum overlap ratio
const std::string & getClassName() const
Get a string representation of the name of this class.
void setMaxRatio(double ratio)
brief set the maximum overlap ratio
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
boost::shared_ptr< DataContainerInterface > DataContainerPtr
double min_ratio_
The minimum overlap ratio between the input and target clouds.
double factor_
The factor for correspondence rejection.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
CorrespondenceRejectoVarTrimmed implements a simple correspondence rejection method by considering as...
boost::shared_ptr< CorrespondenceRejectorVarTrimmed > Ptr
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
DataContainer is a container for the input and target point clouds and implements the interface to co...
boost::shared_ptr< const CorrespondenceRejectorVarTrimmed > ConstPtr
std::string rejection_name_
The name of the rejection method.