Point Cloud Library (PCL)
1.9.1
|
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_)
107 boost::static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputSource (cloud);
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_)
120 boost::static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputSource (cloud);
127 template <
typename Po
intT>
inline void
130 if (!data_container_)
132 boost::static_pointer_cast<DataContainer<PointT> > (data_container_)->setInputTarget (target);
148 setInputSource<PointXYZ> (cloud);
162 setInputTarget<PointXYZ> (cloud);
172 template <
typename Po
intT>
inline void
174 bool force_no_recompute =
false)
176 boost::static_pointer_cast< DataContainer<PointT> >
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_
This file defines compatibility wrappers for low level I/O functions.
double factor_
The factor for correspondence rejection.
double max_ratio_
The maximum overlap ratio between the input and target clouds.
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...
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.
boost::shared_ptr< CorrespondenceRejectorVarTrimmed > Ptr
void setTargetPoints(pcl::PCLPointCloud2::ConstPtr cloud2)
Method for setting the target cloud.
PointCloud represents the base class in PCL for storing collections of 3D points.
boost::shared_ptr< const CorrespondenceRejectorVarTrimmed > ConstPtr
boost::shared_ptr< DataContainerInterface > DataContainerPtr
double trimmed_distance_
The inlier distance threshold (based on the computed trim factor) between two correspondent points in...
void setMinRatio(double ratio)
brief set the minimum overlap ratio
void setSourcePoints(pcl::PCLPointCloud2::ConstPtr cloud2)
Blob method for setting the source cloud.
void setMaxRatio(double ratio)
brief set the maximum overlap ratio
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
bool requiresTargetPoints() const
See if this rejector requires a target cloud.
DataContainer is a container for the input and target point clouds and implements the interface to co...
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 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.
CorrespondenceRejectorVarTrimmed()
Empty constructor.
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...
CorrespondenceRejectoVarTrimmed implements a simple correspondence rejection method by considering as...
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
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.
bool requiresSourcePoints() const
See if this rejector requires source points.
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
double getMaxRatio() const
brief get the maximum overlap ratio
CorrespondencesConstPtr input_correspondences_
The input correspondences.
std::string rejection_name_
The name of the rejection method.
double getTrimmedDistance() const
Get the trimmed distance used for thresholding in correspondence rejection.
CorrespondenceRejector represents the base class for correspondence rejection methods
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.