|
Point Cloud Library (PCL) 1.12.0
|
CorrespondenceRejectorSampleConsensus implements a correspondence rejection using Random Sample Consensus to identify inliers (and reject outliers) More...
#include <pcl/registration/correspondence_rejection_sample_consensus.h>
Inheritance diagram for pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >:
Collaboration diagram for pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >:Public Types | |
| using | Ptr = shared_ptr<CorrespondenceRejectorSampleConsensus<PointT>> |
| using | ConstPtr = shared_ptr<const CorrespondenceRejectorSampleConsensus<PointT>> |
Public Types inherited from pcl::registration::CorrespondenceRejector | |
| using | Ptr = shared_ptr<CorrespondenceRejector> |
| using | ConstPtr = shared_ptr<const CorrespondenceRejector> |
Public Member Functions | |
| CorrespondenceRejectorSampleConsensus () | |
| Empty constructor. | |
| ~CorrespondenceRejectorSampleConsensus () | |
| Empty destructor. | |
| void | getRemainingCorrespondences (const pcl::Correspondences &original_correspondences, pcl::Correspondences &remaining_correspondences) override |
| Get a list of valid correspondences after rejection from the original set of correspondences. | |
| 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. | |
| 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. | |
| bool | requiresSourcePoints () const override |
| See if this rejector requires source points. | |
| void | setSourcePoints (pcl::PCLPointCloud2::ConstPtr cloud2) override |
| Blob method for setting the source cloud. | |
| bool | requiresTargetPoints () const override |
| See if this rejector requires a target cloud. | |
| void | setTargetPoints (pcl::PCLPointCloud2::ConstPtr cloud2) override |
| Method for setting the target cloud. | |
| void | setInlierThreshold (double threshold) |
| Set the maximum distance between corresponding points. | |
| double | getInlierThreshold () |
| Get the maximum distance between corresponding points. | |
| void | setMaximumIterations (int max_iterations) |
| Set 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 (pcl::Indices &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. | |
| const std::string & | getClassName () const |
| Get a string representation of the name of this class. | |
Public Member Functions inherited from pcl::registration::CorrespondenceRejector | |
| CorrespondenceRejector () | |
| Empty constructor. | |
| virtual | ~CorrespondenceRejector () |
| Empty destructor. | |
| virtual void | setInputCorrespondences (const CorrespondencesConstPtr &correspondences) |
| Provide a pointer to the vector of the input correspondences. | |
| CorrespondencesConstPtr | getInputCorrespondences () |
| Get a pointer to the vector of the input correspondences. | |
| void | getCorrespondences (pcl::Correspondences &correspondences) |
| Run correspondence rejection. | |
| void | getRejectedQueryIndices (const pcl::Correspondences &correspondences, pcl::Indices &indices) |
| Determine the indices of query points of correspondences that have been rejected, i.e., the difference between the input correspondences (set via setInputCorrespondences) and the given correspondence vector. | |
| const std::string & | getClassName () const |
| Get a string representation of the name of this class. | |
| virtual bool | requiresSourceNormals () const |
| See if this rejector requires source normals. | |
| virtual void | setSourceNormals (pcl::PCLPointCloud2::ConstPtr) |
| Abstract method for setting the source normals. | |
| virtual bool | requiresTargetNormals () const |
| See if this rejector requires target normals. | |
| virtual void | setTargetNormals (pcl::PCLPointCloud2::ConstPtr) |
| Abstract method for setting the target normals. | |
Public Attributes | |
| CorrespondencesConstPtr | input_correspondences_ |
| The input correspondences. | |
| std::string | rejection_name_ |
| The name of the rejection method. | |
Protected Member Functions | |
| void | applyRejection (pcl::Correspondences &correspondences) override |
| Apply the rejection algorithm. | |
Protected Member Functions inherited from pcl::registration::CorrespondenceRejector | |
Protected Attributes | |
| double | inlier_threshold_ |
| int | max_iterations_ |
| PointCloudConstPtr | input_ |
| PointCloudPtr | input_transformed_ |
| PointCloudConstPtr | target_ |
| Eigen::Matrix4f | best_transformation_ |
| bool | refine_ |
| pcl::Indices | inlier_indices_ |
| bool | save_inliers_ |
Protected Attributes inherited from pcl::registration::CorrespondenceRejector | |
| std::string | rejection_name_ |
| The name of the rejection method. | |
| CorrespondencesConstPtr | input_correspondences_ |
| The input correspondences. | |
CorrespondenceRejectorSampleConsensus implements a correspondence rejection using Random Sample Consensus to identify inliers (and reject outliers)
Definition at line 54 of file correspondence_rejection_sample_consensus.h.
| using pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::ConstPtr = shared_ptr<const CorrespondenceRejectorSampleConsensus<PointT>> |
Definition at line 65 of file correspondence_rejection_sample_consensus.h.
| using pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::Ptr = shared_ptr<CorrespondenceRejectorSampleConsensus<PointT>> |
Definition at line 64 of file correspondence_rejection_sample_consensus.h.
|
inline |
Empty constructor.
Sets the inlier threshold to 5cm (0.05m), and the maximum number of iterations to 1000.
Definition at line 70 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::rejection_name_.
|
inline |
Empty destructor.
Definition at line 83 of file correspondence_rejection_sample_consensus.h.
|
inlineoverrideprotectedvirtual |
Apply the rejection algorithm.
| [out] | correspondences | the set of resultant correspondences. |
Implements pcl::registration::CorrespondenceRejector.
Reimplemented in pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >.
Definition at line 254 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_correspondences_.
|
inline |
Get the best transformation after RANSAC rejection.
Definition at line 200 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::best_transformation_.
Referenced by pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::clusterCorrespondences(), and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences().
|
inline |
Get a string representation of the name of this class.
Definition at line 131 of file correspondence_rejection.h.
|
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 228 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_indices_.
|
inline |
Get the maximum distance between corresponding points.
Definition at line 173 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_.
|
inline |
Get a pointer to the input point cloud dataset target.
Definition at line 105 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_.
|
inline |
Get a pointer to the input point cloud dataset target.
Definition at line 121 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_.
|
inline |
Get the maximum number of iterations.
Definition at line 191 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_.
|
inline |
Get the internal refine parameter value as set by the user using setRefineModel.
Definition at line 218 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_.
|
inlineoverridevirtual |
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 55 of file correspondence_rejection_sample_consensus.hpp.
References pcl::RandomSampleConsensus< PointT >::computeModel(), pcl::SampleConsensus< T >::getInliers(), pcl::SampleConsensus< T >::getModelCoefficients(), pcl::SampleConsensus< T >::refineModel(), and pcl::SampleConsensus< T >::setMaxIterations().
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::applyRejection(), pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::clusterCorrespondences(), and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences().
|
inline |
Get whether the rejector is configured to save inliers.
Definition at line 244 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::save_inliers_.
|
inlineoverridevirtual |
See if this rejector requires source points.
Reimplemented from pcl::registration::CorrespondenceRejector.
Definition at line 128 of file correspondence_rejection_sample_consensus.h.
|
inlineoverridevirtual |
See if this rejector requires a target cloud.
Reimplemented from pcl::registration::CorrespondenceRejector.
Definition at line 144 of file correspondence_rejection_sample_consensus.h.
|
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 164 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_.
Referenced by pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::clusterCorrespondences(), and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences().
|
inlinevirtual |
Provide a source point cloud dataset (must contain XYZ data!)
| [in] | cloud | a cloud containing XYZ data |
Definition at line 98 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_.
Referenced by pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::clusterCorrespondences(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setSourcePoints().
|
inlinevirtual |
Provide a target point cloud dataset (must contain XYZ data!)
| [in] | cloud | a cloud containing XYZ data |
Definition at line 114 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_.
Referenced by pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::clusterCorrespondences(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setTargetPoints().
|
inline |
Set the maximum number of iterations.
| [in] | max_iterations | Maximum number if iterations to run |
Definition at line 182 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_.
Referenced by pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::clusterCorrespondences(), and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences().
|
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 210 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_.
|
inline |
Set whether to save inliers or not.
| [in] | s | True to save inliers / False otherwise |
Definition at line 237 of file correspondence_rejection_sample_consensus.h.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::save_inliers_.
|
inlineoverridevirtual |
Blob method for setting the source cloud.
Reimplemented from pcl::registration::CorrespondenceRejector.
Definition at line 135 of file correspondence_rejection_sample_consensus.h.
References pcl::fromPCLPointCloud2(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInputSource().
|
inlineoverridevirtual |
Method for setting the target cloud.
Reimplemented from pcl::registration::CorrespondenceRejector.
Definition at line 151 of file correspondence_rejection_sample_consensus.h.
References pcl::fromPCLPointCloud2(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInputTarget().
|
protected |
Definition at line 267 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getBestTransformation().
|
protected |
Definition at line 270 of file correspondence_rejection_sample_consensus.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInliersIndices().
|
protected |
|
protected |
| CorrespondencesConstPtr pcl::registration::CorrespondenceRejector::input_correspondences_ |
The input correspondences.
Definition at line 200 of file correspondence_rejection.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::applyRejection(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::applyRejection().
|
protected |
Definition at line 264 of file correspondence_rejection_sample_consensus.h.
|
protected |
|
protected |
| std::string pcl::registration::CorrespondenceRejector::rejection_name_ |
The name of the rejection method.
Definition at line 197 of file correspondence_rejection.h.
Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::CorrespondenceRejectorSampleConsensus(), and pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::CorrespondenceRejectorSampleConsensus2D().
|
protected |
|
protected |