Point Cloud Library (PCL)  1.7.1
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::registration::CorrespondenceRejectorSampleConsensus< PointT > Class Template Reference

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

Public Types

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

 CorrespondenceRejectorSampleConsensus ()
 Empty constructor. More...
 
virtual ~CorrespondenceRejectorSampleConsensus ()
 Empty destructor. 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...
 
 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!) More...
 
 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. 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...
 
 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!) 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...
 
void setInlierThreshold (double threshold)
 Set the maximum distance between corresponding points. More...
 
double getInlierThreshold ()
 Get the maximum distance between corresponding points. More...
 
 PCL_DEPRECATED (void setMaxIterations(int max_iterations),"[pcl::registration::CorrespondenceRejectorSampleConsensus::setMaxIterations] setMaxIterations is deprecated. Please use setMaximumIterations instead.")
 Set the maximum number of iterations. More...
 
void setMaximumIterations (int max_iterations)
 Set the maximum number of iterations. More...
 
 PCL_DEPRECATED (int getMaxIterations(),"[pcl::registration::CorrespondenceRejectorSampleConsensus::getMaxIterations] getMaxIterations is deprecated. Please use getMaximumIterations instead.")
 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...
 
- 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...
 

Protected Member Functions

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

Protected Attributes

double inlier_threshold_
 
int max_iterations_
 
PointCloudConstPtr input_
 
PointCloudPtr input_transformed_
 
PointCloudConstPtr target_
 
Eigen::Matrix4f best_transformation_
 
bool refine_
 
- 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::CorrespondenceRejectorSampleConsensus< PointT >

CorrespondenceRejectorSampleConsensus implements a correspondence rejection using Random Sample Consensus to identify inliers (and reject outliers)

Author
Dirk Holz

Definition at line 59 of file correspondence_rejection_sample_consensus.h.

Member Typedef Documentation

Definition at line 71 of file correspondence_rejection_sample_consensus.h.

Definition at line 70 of file correspondence_rejection_sample_consensus.h.

Constructor & Destructor Documentation

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_.

Empty destructor.

Definition at line 89 of file correspondence_rejection_sample_consensus.h.

Member Function Documentation

template<typename PointT>
void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::applyRejection ( pcl::Correspondences correspondences)
inlineprotectedvirtual
template<typename PointT>
Eigen::Matrix4f pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getBestTransformation ( )
inline

Get the best transformation after RANSAC rejection.

Returns
The homogeneous 4x4 transformation yielding the largest number of inliers.

Definition at line 175 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::best_transformation_.

template<typename PointT>
double pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInlierThreshold ( )
inline

Get the maximum distance between corresponding points.

Returns
Distance threshold in the same dimension as source and target data sets.

Definition at line 147 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_.

template<typename PointT>
PointCloudConstPtr const pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInputSource ( )
inline

Get a pointer to the input point cloud dataset target.

Definition at line 119 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_.

template<typename PointT>
PointCloudConstPtr const pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getInputTarget ( )
inline

Get a pointer to the input point cloud dataset target.

Definition at line 134 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_.

template<typename PointT>
int pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getMaximumIterations ( )
inline

Get the maximum number of iterations.

Returns
max_iterations Maximum number if iterations to run

Definition at line 169 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_.

template<typename PointT>
bool pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRefineModel ( ) const
inline

Get the internal refine parameter value as set by the user using setRefineModel.

Definition at line 188 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_.

template<typename PointT >
void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::getRemainingCorrespondences ( const pcl::Correspondences original_correspondences,
pcl::Correspondences remaining_correspondences 
)
inlinevirtual

Get a list of valid correspondences after rejection from the original set of correspondences.

Parameters
[in]original_correspondencesthe set of initial correspondences given
[out]remaining_correspondencesthe 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::RandomSampleConsensus< PointT >::computeModel(), pcl::SampleConsensus< PointT >::getInliers(), pcl::SampleConsensus< PointT >::getModelCoefficients(), pcl::SampleConsensus< PointT >::refineModel(), and pcl::SampleConsensus< PointT >::setMaxIterations().

Referenced by pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::applyRejection().

template<typename PointT>
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!)

Parameters
[in]clouda cloud containing XYZ data
template<typename PointT>
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.

template<typename PointT>
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!)

Parameters
[in]clouda cloud containing XYZ data
template<typename PointT>
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.

Parameters
[in]max_iterationsMaximum number if iterations to run
template<typename PointT>
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.

Returns
max_iterations Maximum number if iterations to run
template<typename PointT>
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.

Parameters
[in]thresholdDistance threshold in the same dimension as source and target data sets.

Definition at line 141 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_.

template<typename PointT>
virtual void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInputSource ( const PointCloudConstPtr &  cloud)
inlinevirtual

Provide a source point cloud dataset (must contain XYZ data!)

Parameters
[in]clouda cloud containing XYZ data

Definition at line 112 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_.

template<typename PointT>
virtual void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setInputTarget ( const PointCloudConstPtr &  cloud)
inlinevirtual

Provide a target point cloud dataset (must contain XYZ data!)

Parameters
[in]clouda cloud containing XYZ data

Definition at line 130 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_.

template<typename PointT>
void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setMaximumIterations ( int  max_iterations)
inline
template<typename PointT>
void pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setRefineModel ( const bool  refine)
inline

Specify whether the model should be refined internally using the variance of the inliers.

Parameters
[in]refinetrue if the model should be refined, false otherwise

Definition at line 181 of file correspondence_rejection_sample_consensus.h.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_.

Member Data Documentation

template<typename PointT>
Eigen::Matrix4f pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::best_transformation_
protected
template<typename PointT>
double pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::inlier_threshold_
protected
template<typename PointT>
PointCloudConstPtr pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_
protected
template<typename PointT>
PointCloudPtr pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::input_transformed_
protected

Definition at line 208 of file correspondence_rejection_sample_consensus.h.

template<typename PointT>
int pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::max_iterations_
protected
template<typename PointT>
bool pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::refine_
protected
template<typename PointT>
PointCloudConstPtr pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::target_
protected

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