CorrespondenceRejectorSampleConsensus implements a correspondence rejection using Random Sample Consensus to identify inliers (and reject outliers). More...
#include <pcl/registration/correspondence_rejection_sample_consensus.h>


Public Types | |
| typedef boost::shared_ptr < CorrespondenceRejectorSampleConsensus > | Ptr |
| typedef boost::shared_ptr < const CorrespondenceRejectorSampleConsensus > | ConstPtr |
Public Member Functions | |
| CorrespondenceRejectorSampleConsensus () | |
| Empty constructor. | |
| virtual | ~CorrespondenceRejectorSampleConsensus () |
| Empty destructor. | |
| 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. | |
| 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!). | |
| PCL_DEPRECATED (PointCloudConstPtr const getInputCloud(),"[pcl::registration::CorrespondenceRejectorSampleConsensus::getInputCloud] getInputCloud is deprecated. Please use getInputSource instead.") | |
| Get a pointer to the input point cloud dataset target. | |
| virtual void | setInputSource (const PointCloudConstPtr &cloud) |
| Provide a source point cloud dataset (must contain XYZ data!). | |
| PointCloudConstPtr const | getInputSource () |
| Get a pointer to the input point cloud dataset target. | |
| PCL_DEPRECATED (virtual void setTargetCloud(const PointCloudConstPtr &cloud),"[pcl::registration::CorrespondenceRejectorSampleConsensus::setTargetCloud] setTargetCloud is deprecated. Please use setInputTarget instead.") | |
| Provide a target point cloud dataset (must contain XYZ data!). | |
| virtual void | setInputTarget (const PointCloudConstPtr &cloud) |
| Provide a target point cloud dataset (must contain XYZ data!). | |
| PointCloudConstPtr const | getInputTarget () |
| Get a pointer to the input point cloud dataset target. | |
| void | setInlierThreshold (double threshold) |
| Set the maximum distance between corresponding points. | |
| double | getInlierThreshold () |
| Get the maximum distance between corresponding points. | |
| PCL_DEPRECATED (void setMaxIterations(int max_iterations),"[pcl::registration::CorrespondenceRejectorSampleConsensus::setMaxIterations] setMaxIterations is deprecated. Please use setMaximumIterations instead.") | |
| Set the maximum number of iterations. | |
| void | setMaximumIterations (int max_iterations) |
| Set the maximum number of iterations. | |
| PCL_DEPRECATED (int getMaxIterations(),"[pcl::registration::CorrespondenceRejectorSampleConsensus::getMaxIterations] getMaxIterations is deprecated. Please use getMaximumIterations instead.") | |
| Get the maximum number of iterations. | |
| int | getMaximumIterations () |
| Get the maximum number of iterations. | |
| Eigen::Matrix4f | getBestTransformation () |
| Get the best transformation after RANSAC rejection. | |
| void | setRefineModel (const bool refine) |
| Specify whether the model should be refined internally using the variance of the inliers. | |
| bool | getRefineModel () const |
| Get the internal refine parameter value as set by the user using setRefineModel. | |
| void | getInliersIndices (std::vector< int > &inlier_indices) |
| Get the inlier indices found by the correspondence rejector. | |
| void | setSaveInliers (bool s) |
| Set whether to save inliers or not. | |
| bool | getSaveInliers () |
| Get whether the rejector is configured to save inliers. | |
Protected Member Functions | |
| void | applyRejection (pcl::Correspondences &correspondences) |
| Apply the rejection algorithm. | |
Protected Attributes | |
| double | inlier_threshold_ |
| int | max_iterations_ |
| PointCloudConstPtr | input_ |
| PointCloudPtr | input_transformed_ |
| PointCloudConstPtr | target_ |
| Eigen::Matrix4f | best_transformation_ |
| bool | refine_ |
| std::vector< int > | inlier_indices_ |
| bool | save_inliers_ |
CorrespondenceRejectorSampleConsensus implements a correspondence rejection using Random Sample Consensus to identify inliers (and reject outliers).
Definition at line 59 of file correspondence_rejection_sample_consensus.h.
| typedef boost::shared_ptr<const CorrespondenceRejectorSampleConsensus> pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::ConstPtr |
Reimplemented from pcl::registration::CorrespondenceRejector.
Reimplemented in pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >.
Definition at line 71 of file correspondence_rejection_sample_consensus.h.
| typedef boost::shared_ptr<CorrespondenceRejectorSampleConsensus> pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::Ptr |
Reimplemented from pcl::registration::CorrespondenceRejector.
Reimplemented in pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >.
Definition at line 70 of file correspondence_rejection_sample_consensus.h.
| pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::CorrespondenceRejectorSampleConsensus | ( | ) | [inline] |
Empty constructor.
Sets the inlier threshold to 5cm (0.05m), and the maximum number of iterations to 1000.
Definition at line 76 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejector::rejection_name_.
| virtual pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::~CorrespondenceRejectorSampleConsensus | ( | ) | [inline, virtual] |
Empty destructor.
Definition at line 90 of file correspondence_rejection_sample_consensus.h.
| void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::applyRejection | ( | pcl::Correspondences & | correspondences | ) | [inline, protected, virtual] |
Apply the rejection algorithm.
| [out] | correspondences | the set of resultant correspondences. |
Implements pcl::registration::CorrespondenceRejector.
Reimplemented in pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >.
Definition at line 217 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejector::input_correspondences_.
| Eigen::Matrix4f pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getBestTransformation | ( | ) | [inline] |
Get the best transformation after RANSAC rejection.
Definition at line 176 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::best_transformation_.
| void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInliersIndices | ( | std::vector< int > & | inlier_indices | ) | [inline] |
Get the inlier indices found by the correspondence rejector.
This information is only saved if setSaveInliers(true) was called in advance.
| [out] | inlier_indices | Indices for the inliers |
Definition at line 198 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_indices_.
| double pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInlierThreshold | ( | ) | [inline] |
Get the maximum distance between corresponding points.
Definition at line 148 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_.
| PointCloudConstPtr const pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInputSource | ( | ) | [inline] |
Get a pointer to the input point cloud dataset target.
Definition at line 120 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_.
| PointCloudConstPtr const pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInputTarget | ( | ) | [inline] |
Get a pointer to the input point cloud dataset target.
Definition at line 135 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_.
| int pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getMaximumIterations | ( | ) | [inline] |
Get the maximum number of iterations.
Definition at line 170 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_.
| bool pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRefineModel | ( | ) | const [inline] |
Get the internal refine parameter value as set by the user using setRefineModel.
Definition at line 189 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_.
| void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences | ( | const pcl::Correspondences & | original_correspondences, | |
| pcl::Correspondences & | remaining_correspondences | |||
| ) | [inline, virtual] |
Get a list of valid correspondences after rejection from the original set of correspondences.
| [in] | original_correspondences | the set of initial correspondences given |
| [out] | remaining_correspondences | the resultant filtered set of remaining correspondences |
Implements pcl::registration::CorrespondenceRejector.
Reimplemented in pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >.
Definition at line 85 of file correspondence_rejection_sample_consensus.hpp.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::best_transformation_, pcl::RandomSampleConsensus< PointT >::computeModel(), pcl::registration::CorrespondenceRejector::getClassName(), pcl::SampleConsensus< PointT >::getInliers(), pcl::SampleConsensus< PointT >::getModelCoefficients(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_indices_, pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_, pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_, pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_, pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_, pcl::SampleConsensus< PointT >::refineModel(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::save_inliers_, pcl::SampleConsensus< PointT >::setMaxIterations(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::applyRejection().
| bool pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getSaveInliers | ( | ) | [inline] |
Get whether the rejector is configured to save inliers.
Definition at line 208 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::save_inliers_.
| pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::PCL_DEPRECATED | ( | int | getMaxIterations(), | |
| " getMaxIterations is deprecated. Please use getMaximumIterations instead." | [pcl::registration::CorrespondenceRejectorSampleConsensus::getMaxIterations] | |||
| ) |
Get the maximum number of iterations.
| pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::PCL_DEPRECATED | ( | void | setMaxIterationsint max_iterations, | |
| " setMaxIterations is deprecated. Please use setMaximumIterations instead." | [pcl::registration::CorrespondenceRejectorSampleConsensus::setMaxIterations] | |||
| ) |
Set the maximum number of iterations.
| [in] | max_iterations | Maximum number if iterations to run |
| pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::PCL_DEPRECATED | ( | virtual void | setTargetCloudconst PointCloudConstPtr &cloud, | |
| " setTargetCloud is deprecated. Please use setInputTarget instead." | [pcl::registration::CorrespondenceRejectorSampleConsensus::setTargetCloud] | |||
| ) |
Provide a target point cloud dataset (must contain XYZ data!).
| [in] | cloud | a cloud containing XYZ data |
| pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::PCL_DEPRECATED | ( | PointCloudConstPtr const | getInputCloud(), | |
| " getInputCloud is deprecated. Please use getInputSource instead." | [pcl::registration::CorrespondenceRejectorSampleConsensus::getInputCloud] | |||
| ) |
Get a pointer to the input point cloud dataset target.
| pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::PCL_DEPRECATED | ( | virtual void | setInputCloudconst PointCloudConstPtr &cloud, | |
| " setInputCloud is deprecated. Please use setInputSource instead." | [pcl::registration::CorrespondenceRejectorSampleConsensus::setInputCloud] | |||
| ) |
Provide a source point cloud dataset (must contain XYZ data!).
| [in] | cloud | a cloud containing XYZ data |
| void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInlierThreshold | ( | double | threshold | ) | [inline] |
Set the maximum distance between corresponding points.
Correspondences with distances below the threshold are considered as inliers.
| [in] | threshold | Distance threshold in the same dimension as source and target data sets. |
Definition at line 142 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_.
| virtual void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInputSource | ( | const PointCloudConstPtr & | cloud | ) | [inline, virtual] |
Provide a source point cloud dataset (must contain XYZ data!).
| [in] | cloud | a cloud containing XYZ data |
Definition at line 113 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_.
| virtual void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInputTarget | ( | const PointCloudConstPtr & | cloud | ) | [inline, virtual] |
Provide a target point cloud dataset (must contain XYZ data!).
| [in] | cloud | a cloud containing XYZ data |
Definition at line 131 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_.
| void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setMaximumIterations | ( | int | max_iterations | ) | [inline] |
Set the maximum number of iterations.
| [in] | max_iterations | Maximum number if iterations to run |
Definition at line 159 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_.
| void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setRefineModel | ( | const bool | refine | ) | [inline] |
Specify whether the model should be refined internally using the variance of the inliers.
| [in] | refine | true if the model should be refined, false otherwise |
Definition at line 182 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_.
| void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setSaveInliers | ( | bool | s | ) | [inline] |
Set whether to save inliers or not.
| [in] | s | True to save inliers / False otherwise |
Definition at line 204 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::save_inliers_.
Eigen::Matrix4f pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::best_transformation_ [protected] |
Definition at line 230 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getBestTransformation(), pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences().
std::vector<int> pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_indices_ [protected] |
double pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_ [protected] |
Definition at line 222 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInlierThreshold(), pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getRemainingCorrespondences(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInlierThreshold().
PointCloudConstPtr pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_ [protected] |
Definition at line 226 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInputSource(), pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getRemainingCorrespondences(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInputSource().
PointCloudPtr pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_transformed_ [protected] |
Definition at line 227 of file correspondence_rejection_sample_consensus.h.
int pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_ [protected] |
Definition at line 224 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getMaximumIterations(), pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getRemainingCorrespondences(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setMaximumIterations().
bool pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_ [protected] |
Definition at line 232 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRefineModel(), pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getRemainingCorrespondences(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setRefineModel().
bool pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::save_inliers_ [protected] |
Definition at line 234 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getSaveInliers(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setSaveInliers().
PointCloudConstPtr pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_ [protected] |
Definition at line 228 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInputTarget(), pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getRemainingCorrespondences(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInputTarget().