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