pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT > Class Template Reference
Module registration

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>`

Inheritance diagram for pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >:

## Public Types

typedef boost::shared_ptr< CorrespondenceRejectorSampleConsensus2D > | Ptr
typedef boost::shared_ptr< const CorrespondenceRejectorSampleConsensus2D > | ConstPtr
Public Types inherited from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >
typedef boost::shared_ptr< CorrespondenceRejectorSampleConsensus > | Ptr
typedef boost::shared_ptr< const CorrespondenceRejectorSampleConsensus > | ConstPtr
Public Types inherited from pcl::registration::CorrespondenceRejector
typedef boost::shared_ptr< CorrespondenceRejector > | Ptr
typedef boost::shared_ptr< const CorrespondenceRejector > | ConstPtr

## Public Member Functions

| CorrespondenceRejectorSampleConsensus2D ()
| Empty constructor. More...
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. More...
void | setFocalLengths (const float fx, const float fy)
| Sets the focal length parameters of the target camera. More...
void | getFocalLengths (float &fx, float &fy) const
| Reads back the focal length parameters of the target camera. More...
void | setCameraCenters (const float cx, const float cy)
| Sets the camera center parameters of the target camera. More...
void | getCameraCenters (float &cx, float &cy) const
| Reads back the camera center parameters of the target camera. More...
Public Member Functions inherited from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >
| CorrespondenceRejectorSampleConsensus ()
| Empty constructor. More...
virtual | ~CorrespondenceRejectorSampleConsensus ()
| Empty destructor. More...
virtual void | setInputCloud (const PointCloudConstPtr &cloud)
| Provide a source point cloud dataset (must contain XYZ data!) More...
PointCloudConstPtr const | getInputCloud ()
| Get a pointer to the input point cloud dataset target. More...
virtual void | setInputSource (const PointCloudConstPtr &cloud)
| Provide a source point cloud dataset (must contain XYZ data!) More...
PointCloudConstPtr const | getInputSource ()
| Get a pointer to the input point cloud dataset target. More...
virtual void | setTargetCloud (const PointCloudConstPtr &cloud)
| Provide a target point cloud dataset (must contain XYZ data!) More...
virtual void | setInputTarget (const PointCloudConstPtr &cloud)
| Provide a target point cloud dataset (must contain XYZ data!) More...
PointCloudConstPtr const | getInputTarget ()
| Get a pointer to the input point cloud dataset target. More...
bool | requiresSourcePoints () const
| See if this rejector requires source points. More...
void | setSourcePoints (pcl::PCLPointCloud2::ConstPtr cloud2)
| Blob method for setting the source cloud. More...
bool | requiresTargetPoints () const
| See if this rejector requires a target cloud. More...
void | setTargetPoints (pcl::PCLPointCloud2::ConstPtr cloud2)
| Method for setting the target cloud. More...
void | setInlierThreshold (double threshold)
| Set the maximum distance between corresponding points. More...
double | getInlierThreshold ()
| Get the maximum distance between corresponding points. More...
void | setMaxIterations (int max_iterations)
| Set the maximum number of iterations. More...
void | setMaximumIterations (int max_iterations)
| Set the maximum number of iterations. More...
int | getMaxIterations ()
| Get the maximum number of iterations. More...
int | getMaximumIterations ()
| Get the maximum number of iterations. More...
Eigen::Matrix4f | getBestTransformation ()
| Get the best transformation after RANSAC rejection. More...
void | setRefineModel (const bool refine)
| Specify whether the model should be refined internally using the variance of the inliers. More...
bool | getRefineModel () const
| Get the internal refine parameter value as set by the user using setRefineModel. More...
void | getInliersIndices (std::vector< int > &inlier_indices)
| Get the inlier indices found by the correspondence rejector. More...
void | setSaveInliers (bool s)
| Set whether to save inliers or not. More...
bool | getSaveInliers ()
| Get whether the rejector is configured to save inliers. More...
Public Member Functions inherited from pcl::registration::CorrespondenceRejector
| CorrespondenceRejector ()
| Empty constructor. More...
virtual | ~CorrespondenceRejector ()
| Empty destructor. More...
virtual void | setInputCorrespondences (const CorrespondencesConstPtr &correspondences)
| Provide a pointer to the vector of the input correspondences. More...
CorrespondencesConstPtr | getInputCorrespondences ()
| Get a pointer to the vector of the input correspondences. More...
void | getCorrespondences (pcl::Correspondences &correspondences)
| Run correspondence rejection. More...
void | getRejectedQueryIndices (const pcl::Correspondences &correspondences, std::vector< int > &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. More...
const std::string & | getClassName () const
| Get a string representation of the name of this class. More...
virtual bool | requiresSourceNormals () const
| See if this rejector requires source normals. More...
virtual void | setSourceNormals (pcl::PCLPointCloud2::ConstPtr)
| Abstract method for setting the source normals. More...
virtual bool | requiresTargetNormals () const
| See if this rejector requires target normals. More...
virtual void | setTargetNormals (pcl::PCLPointCloud2::ConstPtr)
| Abstract method for setting the target normals. More...

## Protected Member Functions

void | applyRejection (pcl::Correspondences &correspondences)
| Apply the rejection algorithm. More...

## Protected Attributes

Eigen::Matrix3f | projection_matrix_
| Camera projection matrix. More...
Protected Attributes inherited from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >
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_
Protected Attributes inherited from pcl::registration::CorrespondenceRejector
std::string | rejection_name_
| The name of the rejection method. More...
CorrespondencesConstPtr | input_correspondences_
| The input correspondences. More...

## Detailed Description

### template<typename PointT>
class pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >

CorrespondenceRejectorSampleConsensus2D implements a pixel-based correspondence rejection using Random Sample Consensus to identify inliers (and reject outliers)

Author
  Radu B. Rusu

Definition at line 55 of file correspondence_rejection_sample_consensus_2d.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointT >

typedef boost::shared_ptr<const CorrespondenceRejectorSampleConsensus2D> pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::ConstPtr

Definition at line 73 of file correspondence_rejection_sample_consensus_2d.h.

## Ptr

template<typename PointT >

typedef boost::shared_ptr<CorrespondenceRejectorSampleConsensus2D> pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::Ptr

Definition at line 72 of file correspondence_rejection_sample_consensus_2d.h.

## Constructor & Destructor Documentation

## CorrespondenceRejectorSampleConsensus2D()

template<typename PointT >

pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::CorrespondenceRejectorSampleConsensus2D | ( |  | ) |

inline

Empty constructor.

Sets the inlier threshold to 5cm (0.05m), and the maximum number of iterations to 1000.

Definition at line 78 of file correspondence_rejection_sample_consensus_2d.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejector::rejection_name_.

## Member Function Documentation

## applyRejection()

template<typename PointT >

void pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::applyRejection | ( | pcl::Correspondences & | correspondences | ) |

inline protected virtual

Apply the rejection algorithm.

Parameters

  [out] | correspondences | the set of resultant correspondences.

Reimplemented from pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >.

Definition at line 148 of file correspondence_rejection_sample_consensus_2d.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getRemainingCorrespondences(), and pcl::registration::CorrespondenceRejector::input_correspondences_.

## getCameraCenters()

template<typename PointT >

void pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getCameraCenters | ( | float & | cx,
|  | float & | cy
| ) |  | const

inline

Reads back the camera center parameters of the target camera.

Parameters

  [out] | cx | the x-coordinate of the camera center
  [out] | cy | the y-coordinate of the camera center

Definition at line 136 of file correspondence_rejection_sample_consensus_2d.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::projection_matrix_.

## getFocalLengths()

template<typename PointT >

void pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getFocalLengths | ( | float & | fx,
|  | float & | fy
| ) |  | const

inline

Reads back the focal length parameters of the target camera.

Parameters

  [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 113 of file correspondence_rejection_sample_consensus_2d.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::projection_matrix_.

## getRemainingCorrespondences()

template<typename PointT >

void pcl::registration::CorrespondenceRejectorSampleConsensus2D< 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.

Parameters

  [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 46 of file correspondence_rejection_sample_consensus_2d.hpp.

References pcl::RandomSampleConsensus< PointT >::computeModel(), pcl::SampleConsensus< PointT >::getInliers(), pcl::SampleConsensus< PointT >::getModelCoefficients(), pcl::SampleConsensus< PointT >::refineModel(), pcl::SampleConsensusModelRegistration< PointT >::setInputTarget(), pcl::SampleConsensus< PointT >::setMaxIterations(), and pcl::SampleConsensusModelRegistration2D< PointT >::setProjectionMatrix().

Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::applyRejection(), and pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::CorrespondenceRejectorSampleConsensus2D().

## setCameraCenters()

template<typename PointT >

void pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::setCameraCenters | ( | const float | cx,
|  | const float | cy
| ) |  |

inline

Sets the camera center parameters of the target camera.

Parameters

  [in] | cx | the x-coordinate of the camera center
  [in] | cy | the y-coordinate of the camera center

Definition at line 125 of file correspondence_rejection_sample_consensus_2d.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::projection_matrix_.

## setFocalLengths()

template<typename PointT >

void pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::setFocalLengths | ( | const float | fx,
|  | const float | fy
| ) |  |

inline

Sets the focal length parameters of the target camera.

Parameters

  [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 102 of file correspondence_rejection_sample_consensus_2d.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::projection_matrix_.

## Member Data Documentation

## projection_matrix_

template<typename PointT >

Eigen::Matrix3f pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::projection_matrix_

protected

Camera projection matrix.

Definition at line 154 of file correspondence_rejection_sample_consensus_2d.h.

Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getCameraCenters(), pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::getFocalLengths(), pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::setCameraCenters(), and pcl::registration::CorrespondenceRejectorSampleConsensus2D< PointT >::setFocalLengths().

The documentation for this class was generated from the following files:

- /build/pcl-OilVEB/pcl-1.8.1+dfsg1/registration/include/pcl/registration/correspondence_rejection_sample_consensus_2d.h
- /build/pcl-OilVEB/pcl-1.8.1+dfsg1/registration/include/pcl/registration/impl/correspondence_rejection_sample_consensus_2d.hpp