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_)
148 setInputSource<PointXYZ> (cloud);
162 setInputTarget<PointXYZ> (cloud);
172 template <
typename Po
intT>
inline void 174 bool force_no_recompute =
false)
177 (data_container_)->setSearchMethodTarget (tree, force_no_recompute );
214 getRemainingCorrespondences (*input_correspondences_, correspondences);
248 inline float optimizeInlierRatio (std::vector <double> &dists);
253 #include <pcl/registration/impl/correspondence_rejection_var_trimmed.hpp> 255 #endif // PCL_REGISTRATION_CORRESPONDENCE_REJECTION_VAR_TRIMMED_H_ 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...
double factor_
The factor for correspondence rejection.
DataContainer is a container for the input and target point clouds and implements the interface to co...
CorrespondenceRejectoVarTrimmed implements a simple correspondence rejection method by considering as...
bool requiresSourcePoints() const
See if this rejector requires source points.
boost::shared_ptr< const CorrespondenceRejectorVarTrimmed > ConstPtr
CorrespondenceRejector represents the base class for correspondence rejection methods ...
bool requiresTargetPoints() const
See if this rejector requires a target cloud.
double trimmed_distance_
The inlier distance threshold (based on the computed trim factor) between two correspondent points in...
void setSourcePoints(pcl::PCLPointCloud2::ConstPtr cloud2)
Blob method for setting the source cloud.
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 setTargetPoints(pcl::PCLPointCloud2::ConstPtr cloud2)
Method for setting the target cloud.
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...
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points. ...
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.