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;
103 PCL_DEPRECATED (
virtual void setInputCloud (
const PointCloudConstPtr &cloud),
104 "[pcl::registration::CorrespondenceRejectorSampleConsensus::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead.");
107 PCL_DEPRECATED (PointCloudConstPtr
const getInputCloud (),
"[pcl::registration::CorrespondenceRejectorSampleConsensus::getInputCloud] getInputCloud is deprecated. Please use getInputSource instead.");
119 inline PointCloudConstPtr
const
125 PCL_DEPRECATED (
virtual void setTargetCloud (
const PointCloudConstPtr &cloud),
"[pcl::registration::CorrespondenceRejectorSampleConsensus::setTargetCloud] setTargetCloud is deprecated. Please use setInputTarget instead.");
134 inline PointCloudConstPtr
const
153 PCL_DEPRECATED (
void setMaxIterations (
int max_iterations),
"[pcl::registration::CorrespondenceRejectorSampleConsensus::setMaxIterations] setMaxIterations is deprecated. Please use setMaximumIterations instead.");
164 PCL_DEPRECATED (
int getMaxIterations (),
"[pcl::registration::CorrespondenceRejectorSampleConsensus::getMaxIterations] getMaxIterations is deprecated. Please use getMaximumIterations instead.");
175 inline Eigen::Matrix4f
237 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
242 #include <pcl/registration/impl/correspondence_rejection_sample_consensus.hpp>
244 #endif // PCL_REGISTRATION_CORRESPONDENCE_REJECTION_SAMPLE_CONSENSUS_H_
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
std::vector< int > inlier_indices_
void getInliersIndices(std::vector< int > &inlier_indices)
Get the inlier indices found by the correspondence rejector.
PCL_DEPRECATED(virtual void setInputCloud(const PointCloudConstPtr &cloud),"[pcl::registration::CorrespondenceRejectorSampleConsensus::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead.")
Provide a source point cloud dataset (must contain XYZ data!)
virtual void setInputTarget(const PointCloudConstPtr &cloud)
Provide a target point cloud dataset (must contain XYZ data!)
boost::shared_ptr< CorrespondenceRejectorSampleConsensus > Ptr
CorrespondenceRejectorSampleConsensus implements a correspondence rejection using Random Sample Conse...
Eigen::Matrix4f best_transformation_
bool getSaveInliers()
Get whether the rejector is configured to save inliers.
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.
CorrespondenceRejector represents the base class for correspondence rejection methods ...
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
std::string rejection_name_
The name of the rejection method.
Eigen::Matrix4f getBestTransformation()
Get the best transformation after RANSAC rejection.
void setMaximumIterations(int max_iterations)
Set the maximum number of iterations.
void setRefineModel(const bool refine)
Specify whether the model should be refined internally using the variance of the inliers.
int getMaximumIterations()
Get the maximum number of iterations.
PointCloudConstPtr target_
PointCloudConstPtr input_
boost::shared_ptr< const CorrespondenceRejectorSampleConsensus > ConstPtr
virtual ~CorrespondenceRejectorSampleConsensus()
Empty destructor.
void setSaveInliers(bool s)
Set whether to save inliers or not.
PointCloudPtr input_transformed_
CorrespondenceRejectorSampleConsensus()
Empty constructor.
CorrespondencesConstPtr input_correspondences_
The input correspondences.
PointCloudConstPtr const getInputSource()
Get a pointer to the input point cloud dataset target.
double getInlierThreshold()
Get the maximum distance between corresponding points.
boost::shared_ptr< PointCloud< PointT > > Ptr
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.
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
const std::string & getClassName() const
Get a string representation of the name of this class.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
virtual void setInputSource(const PointCloudConstPtr &cloud)
Provide a source point cloud dataset (must contain XYZ data!)
PointCloudConstPtr const getInputTarget()
Get a pointer to the input point cloud dataset target.