|
Point Cloud Library (PCL) 1.15.0
|
CorrespondenceRejectorSampleConsensus2D implements a pixel-based correspondence rejection using Random Sample Consensus to identify inliers (and reject outliers) More...
#include <pcl/registration/correspondence_rejection_sample_consensus_2d.h>
Public Types | |
| using | Ptr = shared_ptr<CorrespondenceRejectorSampleConsensus2D<PointT>> |
| using | ConstPtr = shared_ptr<const CorrespondenceRejectorSampleConsensus2D<PointT>> |
| Public Types inherited from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT > | |
| 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 | |
| CorrespondenceRejectorSampleConsensus2D () | |
| Empty constructor. | |
| 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. | |
| void | setFocalLengths (const float fx, const float fy) |
| Sets the focal length parameters of the target camera. | |
| void | getFocalLengths (float &fx, float &fy) const |
| Reads back the focal length parameters of the target camera. | |
| void | setCameraCenters (const float cx, const float cy) |
| Sets the camera center parameters of the target camera. | |
| void | getCameraCenters (float &cx, float &cy) const |
| Reads back the camera center parameters of the target camera. | |
| Public Member Functions inherited from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT > | |
| CorrespondenceRejectorSampleConsensus () | |
| Empty constructor. | |
| ~CorrespondenceRejectorSampleConsensus () override=default | |
| Empty destructor. | |
| 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 ()=default | |
| Empty constructor. | |
| virtual | ~CorrespondenceRejector ()=default |
| 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. | |
Protected Member Functions | |
| void | applyRejection (pcl::Correspondences &correspondences) |
| Apply the rejection algorithm. | |
Protected Attributes | |
| Eigen::Matrix3f | projection_matrix_ |
| Camera projection matrix. | |
| Protected Attributes inherited from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT > | |
| double | inlier_threshold_ {0.05} |
| int | max_iterations_ {1000} |
| PointCloudConstPtr | input_ |
| PointCloudPtr | input_transformed_ |
| PointCloudConstPtr | target_ |
| Eigen::Matrix4f | best_transformation_ |
| bool | refine_ {false} |
| pcl::Indices | inlier_indices_ |
| bool | save_inliers_ {false} |
| Protected Attributes inherited from pcl::registration::CorrespondenceRejector | |
| std::string | rejection_name_ {} |
| The name of the rejection method. | |
| CorrespondencesConstPtr | input_correspondences_ |
| The input correspondences. | |
Additional Inherited Members | |
| Public Attributes inherited from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT > | |
| CorrespondencesConstPtr | input_correspondences_ |
| The input correspondences. | |
| std::string | rejection_name_ |
| The name of the rejection method. | |
CorrespondenceRejectorSampleConsensus2D implements a pixel-based correspondence rejection using Random Sample Consensus to identify inliers (and reject outliers)
Definition at line 53 of file correspondence_rejection_sample_consensus_2d.h.
| using pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::ConstPtr = shared_ptr<const CorrespondenceRejectorSampleConsensus2D<PointT>> |
Definition at line 71 of file correspondence_rejection_sample_consensus_2d.h.
| using pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::Ptr = shared_ptr<CorrespondenceRejectorSampleConsensus2D<PointT>> |
Definition at line 70 of file correspondence_rejection_sample_consensus_2d.h.
|
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_2d.h.
References projection_matrix_, and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::rejection_name_.
|
inlineprotectedvirtual |
Apply the rejection algorithm.
| [out] | correspondences | the set of resultant correspondences. |
Reimplemented from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >.
Definition at line 145 of file correspondence_rejection_sample_consensus_2d.h.
References getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_correspondences_.
|
inline |
Reads back the camera center parameters of the target camera.
| [out] | cx | the x-coordinate of the camera center |
| [out] | cy | the y-coordinate of the camera center |
Definition at line 134 of file correspondence_rejection_sample_consensus_2d.h.
References projection_matrix_.
|
inline |
Reads back the focal length parameters of the target camera.
| [out] | fx | the focal length in pixels along the x-axis of the image |
| [out] | fy | the focal length in pixels along the y-axis of the image |
Definition at line 112 of file correspondence_rejection_sample_consensus_2d.h.
References projection_matrix_.
|
inlinevirtual |
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 |
Reimplemented from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >.
Definition at line 53 of file correspondence_rejection_sample_consensus_2d.hpp.
References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::best_transformation_, pcl::RandomSampleConsensus< PointT >::computeModel(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getClassName(), pcl::SampleConsensus< T >::getInliers(), pcl::SampleConsensus< T >::getModelCoefficients(), pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_, pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_, pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_, projection_matrix_, pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_, pcl::SampleConsensus< T >::refineModel(), pcl::SampleConsensusModelRegistration< PointT >::setInputTarget(), pcl::SampleConsensus< T >::setMaxIterations(), pcl::SampleConsensusModelRegistration2D< PointT >::setProjectionMatrix(), and pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_.
Referenced by applyRejection().
|
inline |
Sets the camera center parameters of the target camera.
| [in] | cx | the x-coordinate of the camera center |
| [in] | cy | the y-coordinate of the camera center |
Definition at line 123 of file correspondence_rejection_sample_consensus_2d.h.
References projection_matrix_.
|
inline |
Sets the focal length parameters of the target camera.
| [in] | fx | the focal length in pixels along the x-axis of the image |
| [in] | fy | the focal length in pixels along the y-axis of the image |
Definition at line 101 of file correspondence_rejection_sample_consensus_2d.h.
References projection_matrix_.
|
protected |
Camera projection matrix.
Definition at line 151 of file correspondence_rejection_sample_consensus_2d.h.
Referenced by CorrespondenceRejectorSampleConsensus2D(), getCameraCenters(), getFocalLengths(), getRemainingCorrespondences(), setCameraCenters(), and setFocalLengths().