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_
double factor_
The factor for correspondence rejection.
DataContainer is a container for the input and target point clouds and implements the interface to co...
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
CorrespondenceRejectoVarTrimmed implements a simple correspondence rejection method by considering as...
boost::shared_ptr< const CorrespondenceRejectorVarTrimmed > ConstPtr
CorrespondenceRejector represents the base class for correspondence rejection methods ...
double trimmed_distance_
The inlier distance threshold (based on the computed trim factor) between two correspondent points in...
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...
boost::shared_ptr< CorrespondenceRejectorVarTrimmed > Ptr
DataContainerPtr data_container_
A pointer to the DataContainer object containing the input and target point clouds.
double lambda_
part of the term that balances the root mean square difference.
const std::string & getClassName() const
Get a string representation of the name of this class.
double getMaxRatio() const
brief get the maximum overlap ratio
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 getTrimFactor() const
Get the computed inlier ratio used for thresholding in correspondence rejection.
double getMinRatio() const
brief get the minimum overlap ratio
void setMaxRatio(double ratio)
brief set the maximum overlap ratio
boost::shared_ptr< DataContainerInterface > DataContainerPtr
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
CorrespondenceRejectorVarTrimmed()
Empty constructor.
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...
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
double min_ratio_
The minimum 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...
double getTrimmedDistance() const
Get the trimmed distance used for thresholding in correspondence rejection.
CorrespondencesConstPtr input_correspondences_
The input correspondences.
std::string rejection_name_
The name of the rejection method.
double max_ratio_
The maximum overlap ratio between the input and target clouds.