Point Cloud Library (PCL)
1.9.1
|
40 #ifndef PCL_REGISTRATION_CORRESPONDENCE_REJECTION_SAMPLE_CONSENSUS_H_
41 #define PCL_REGISTRATION_CORRESPONDENCE_REJECTION_SAMPLE_CONSENSUS_H_
43 #include <pcl/registration/correspondence_rejection.h>
45 #include <pcl/sample_consensus/ransac.h>
46 #include <pcl/sample_consensus/sac_model_registration.h>
47 #include <pcl/common/transforms.h>
51 namespace registration
58 template <
typename Po
intT>
70 typedef boost::shared_ptr<CorrespondenceRejectorSampleConsensus>
Ptr;
71 typedef boost::shared_ptr<const CorrespondenceRejectorSampleConsensus>
ConstPtr;
110 inline PointCloudConstPtr
const
120 inline PointCloudConstPtr
const
180 inline Eigen::Matrix4f
242 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
247 #include <pcl/registration/impl/correspondence_rejection_sample_consensus.hpp>
249 #endif // PCL_REGISTRATION_CORRESPONDENCE_REJECTION_SAMPLE_CONSENSUS_H_
This file defines compatibility wrappers for low level I/O functions.
boost::shared_ptr< PointCloud< PointT > > Ptr
void getRemainingCorrespondences(const pcl::Correspondences &original_correspondences, pcl::Correspondences &remaining_correspondences)
Get a list of valid correspondences after rejection from the original set of correspondences.
double getInlierThreshold()
Get the maximum distance between corresponding points.
const std::string & getClassName() const
Get a string representation of the name of this class.
virtual ~CorrespondenceRejectorSampleConsensus()
Empty destructor.
PointCloudConstPtr target_
PointCloud represents the base class in PCL for storing collections of 3D points.
PointCloudPtr input_transformed_
int getMaximumIterations()
Get the maximum number of iterations.
void setTargetPoints(pcl::PCLPointCloud2::ConstPtr cloud2)
Method for setting the target cloud.
virtual void setInputTarget(const PointCloudConstPtr &cloud)
Provide a target point cloud dataset (must contain XYZ data!)
void getInliersIndices(std::vector< int > &inlier_indices)
Get the inlier indices found by the correspondence rejector.
boost::shared_ptr< CorrespondenceRejectorSampleConsensus > Ptr
Eigen::Matrix4f getBestTransformation()
Get the best transformation after RANSAC rejection.
void setMaximumIterations(int max_iterations)
Set the maximum number of iterations.
CorrespondenceRejectorSampleConsensus()
Empty constructor.
bool getRefineModel() const
Get the internal refine parameter value as set by the user using setRefineModel.
void setInlierThreshold(double threshold)
Set the maximum distance between corresponding points.
const PointCloudConstPtr getInputSource()
Get a pointer to the input point cloud dataset target.
bool requiresTargetPoints() const
See if this rejector requires a target cloud.
CorrespondenceRejectorSampleConsensus implements a correspondence rejection using Random Sample Conse...
bool getSaveInliers()
Get whether the rejector is configured to save inliers.
Eigen::Matrix4f best_transformation_
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
void setSourcePoints(pcl::PCLPointCloud2::ConstPtr cloud2)
Blob method for setting the source cloud.
void setSaveInliers(bool s)
Set whether to save inliers or not.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
boost::shared_ptr< const CorrespondenceRejectorSampleConsensus > ConstPtr
std::vector< int > inlier_indices_
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
PointCloudConstPtr input_
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
const PointCloudConstPtr getInputTarget()
Get a pointer to the input point cloud dataset target.
void setRefineModel(const bool refine)
Specify whether the model should be refined internally using the variance of the inliers.
virtual void setInputSource(const PointCloudConstPtr &cloud)
Provide a source point cloud dataset (must contain XYZ data!)
bool requiresSourcePoints() const
See if this rejector requires source points.
CorrespondencesConstPtr input_correspondences_
The input correspondences.
std::string rejection_name_
The name of the rejection method.
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.