pcl::SampleConsensusModelRegistration< PointT > Class Template Reference

SampleConsensusModelRegistration defines a model for Point-To-Point registration outlier rejection. More...

#include <sac_model_registration.h>

Inheritance diagram for pcl::SampleConsensusModelRegistration< PointT >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef SampleConsensusModel
< PointT >::PointCloud 
PointCloud
typedef SampleConsensusModel
< PointT >::PointCloudConstPtr 
PointCloudConstPtr
typedef SampleConsensusModel
< PointT >::PointCloudPtr 
PointCloudPtr
typedef boost::shared_ptr
< SampleConsensusModelRegistration
Ptr

Public Member Functions

bool computeModelCoefficients (const std::vector< int > &samples, Eigen::VectorXf &model_coefficients)
 Compute a 4x4 rigid transformation matrix from the samples given.
void computeSampleDistanceThreshold (const PointCloudConstPtr &cloud)
 Computes an "optimal" sample distance threshold based on the principal directions of the input cloud.
bool doSamplesVerifyModel (const std::set< int > &indices, const Eigen::VectorXf &model_coefficients, double threshold)
 Verify whether a subset of indices verifies a given set of model coefficients. Pure virtual.
void getDistancesToModel (const Eigen::VectorXf &model_coefficients, std::vector< double > &distances)
 Compute all distances from the transformed points to their correspondences.
pcl::SacModel getModelType () const
 Return an unique id for this model (SACMODEL_REGISTRATION).
void getSamples (int &iterations, std::vector< int > &samples)
 Get 3 random indices from a subset of given indices.
void optimizeModelCoefficients (const std::vector< int > &inliers, const Eigen::VectorXf &model_coefficients, Eigen::VectorXf &optimized_coefficients)
 Recompute the 4x4 transformation using the given inlier set.
void projectPoints (const std::vector< int > &inliers, const Eigen::VectorXf &model_coefficients, PointCloud &projected_points, bool copy_data_fields=true)
 Create a new point cloud with inliers projected onto the model. Pure virtual.
 SampleConsensusModelRegistration (const PointCloudConstPtr &cloud, const std::vector< int > &indices)
 Constructor for base SampleConsensusModelRegistration.
 SampleConsensusModelRegistration (const PointCloudConstPtr &cloud)
 Constructor for base SampleConsensusModelRegistration.
void selectWithinDistance (const Eigen::VectorXf &model_coefficients, double threshold, std::vector< int > &inliers)
 Select all the points which respect the given model coefficients as inliers.
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
void setInputTarget (const PointCloudConstPtr &target, const std::vector< int > &indices_tgt)
 Set the input point cloud target.
void setInputTarget (const PointCloudConstPtr &target)
 Set the input point cloud target.

Protected Member Functions

bool isModelValid (const Eigen::VectorXf &model_coefficients)
 Check whether a model is valid given the user constraints.

Private Attributes

IndicesPtr indices_tgt_
 A pointer to the vector of target point indices to use.
double sample_dist_thresh_
 Internal distance threshold used for the sample selection step.
PointCloudConstPtr target_
 A boost shared pointer to the target point cloud data array.

Static Private Attributes

static const int MAX_ITERATIONS_COLLINEAR = 1000
 Define the maximum number of iterations for collinearity checks.

Detailed Description

template<typename PointT>
class pcl::SampleConsensusModelRegistration< PointT >

SampleConsensusModelRegistration defines a model for Point-To-Point registration outlier rejection.

Author:
Radu Bogdan Rusu

Definition at line 52 of file sac_model_registration.h.


Member Typedef Documentation

template<typename PointT>
typedef SampleConsensusModel<PointT>::PointCloud pcl::SampleConsensusModelRegistration< PointT >::PointCloud

Reimplemented from pcl::SampleConsensusModel< PointT >.

Definition at line 58 of file sac_model_registration.h.

Reimplemented from pcl::SampleConsensusModel< PointT >.

Definition at line 60 of file sac_model_registration.h.

template<typename PointT>
typedef SampleConsensusModel<PointT>::PointCloudPtr pcl::SampleConsensusModelRegistration< PointT >::PointCloudPtr

Reimplemented from pcl::SampleConsensusModel< PointT >.

Definition at line 59 of file sac_model_registration.h.

template<typename PointT>
typedef boost::shared_ptr<SampleConsensusModelRegistration> pcl::SampleConsensusModelRegistration< PointT >::Ptr

Reimplemented from pcl::SampleConsensusModel< PointT >.

Definition at line 62 of file sac_model_registration.h.


Constructor & Destructor Documentation

template<typename PointT>
pcl::SampleConsensusModelRegistration< PointT >::SampleConsensusModelRegistration ( const PointCloudConstPtr cloud  )  [inline]

Constructor for base SampleConsensusModelRegistration.

Parameters:
cloud the input point cloud dataset

Definition at line 67 of file sac_model_registration.h.

template<typename PointT>
pcl::SampleConsensusModelRegistration< PointT >::SampleConsensusModelRegistration ( const PointCloudConstPtr cloud,
const std::vector< int > &  indices 
) [inline]

Constructor for base SampleConsensusModelRegistration.

Parameters:
cloud the input point cloud dataset
indices a vector of point indices to be used from cloud

Definition at line 76 of file sac_model_registration.h.


Member Function Documentation

template<typename PointT >
bool pcl::SampleConsensusModelRegistration< PointT >::computeModelCoefficients ( const std::vector< int > &  samples,
Eigen::VectorXf &  model_coefficients 
) [inline, virtual]

Compute a 4x4 rigid transformation matrix from the samples given.

Parameters:
samples the indices found as good candidates for creating a valid model
model_coefficients the resultant model coefficients

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 151 of file sac_model_registration.hpp.

template<typename PointT>
void pcl::SampleConsensusModelRegistration< PointT >::computeSampleDistanceThreshold ( const PointCloudConstPtr cloud  )  [inline]

Computes an "optimal" sample distance threshold based on the principal directions of the input cloud.

Parameters:
cloud the const boost shared pointer to a PointCloud message

Definition at line 99 of file sac_model_registration.h.

template<typename PointT>
bool pcl::SampleConsensusModelRegistration< PointT >::doSamplesVerifyModel ( const std::set< int > &  indices,
const Eigen::VectorXf &  model_coefficients,
double  threshold 
) [inline, virtual]

Verify whether a subset of indices verifies a given set of model coefficients. Pure virtual.

Parameters:
indices the data indices that need to be tested against the model
model_coefficients the set of model coefficients
threshold a maximum admissible distance threshold for determining the inliers from the outliers

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 192 of file sac_model_registration.h.

template<typename PointT >
void pcl::SampleConsensusModelRegistration< PointT >::getDistancesToModel ( const Eigen::VectorXf &  model_coefficients,
std::vector< double > &  distances 
) [inline, virtual]

Compute all distances from the transformed points to their correspondences.

Parameters:
model_coefficients the 4x4 transformation matrix
distances the resultant estimated distances

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 178 of file sac_model_registration.hpp.

template<typename PointT>
pcl::SacModel pcl::SampleConsensusModelRegistration< PointT >::getModelType (  )  const [inline, virtual]

Return an unique id for this model (SACMODEL_REGISTRATION).

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 199 of file sac_model_registration.h.

template<typename PointT >
void pcl::SampleConsensusModelRegistration< PointT >::getSamples ( int &  iterations,
std::vector< int > &  samples 
) [inline, virtual]

Get 3 random indices from a subset of given indices.

Parameters:
iterations the internal number of iterations used by SAC methods
samples the resultant model samples
Note:
assumes unique points!

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 48 of file sac_model_registration.hpp.

template<typename PointT>
bool pcl::SampleConsensusModelRegistration< PointT >::isModelValid ( const Eigen::VectorXf &  model_coefficients  )  [inline, protected, virtual]

Check whether a model is valid given the user constraints.

Parameters:
model_coefficients the set of model coefficients

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 206 of file sac_model_registration.h.

template<typename PointT >
void pcl::SampleConsensusModelRegistration< PointT >::optimizeModelCoefficients ( const std::vector< int > &  inliers,
const Eigen::VectorXf &  model_coefficients,
Eigen::VectorXf &  optimized_coefficients 
) [inline, virtual]

Recompute the 4x4 transformation using the given inlier set.

Parameters:
inliers the data inliers found as supporting the model
model_coefficients the initial guess for the optimization
optimized_coefficients the resultant recomputed transformation

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 255 of file sac_model_registration.hpp.

template<typename PointT>
void pcl::SampleConsensusModelRegistration< PointT >::projectPoints ( const std::vector< int > &  inliers,
const Eigen::VectorXf &  model_coefficients,
PointCloud projected_points,
bool  copy_data_fields = true 
) [inline, virtual]

Create a new point cloud with inliers projected onto the model. Pure virtual.

Parameters:
inliers the data inliers that we want to project on the model
model_coefficients the coefficients of a model
projected_points the resultant projected points
copy_data_fields set to true (default) if we want the projected_points cloud to be an exact copy of the input dataset minus the point projections on the plane model

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 186 of file sac_model_registration.h.

template<typename PointT >
void pcl::SampleConsensusModelRegistration< PointT >::selectWithinDistance ( const Eigen::VectorXf &  model_coefficients,
double  threshold,
std::vector< int > &  inliers 
) [inline, virtual]

Select all the points which respect the given model coefficients as inliers.

Parameters:
model_coefficients the 4x4 transformation matrix
threshold a maximum admissible distance threshold for determining the inliers from the outliers
inliers the resultant model inliers

Implements pcl::SampleConsensusModel< PointT >.

Definition at line 214 of file sac_model_registration.hpp.

template<typename PointT>
virtual void pcl::SampleConsensusModelRegistration< PointT >::setInputCloud ( const PointCloudConstPtr cloud  )  [inline, virtual]

Provide a pointer to the input dataset.

Parameters:
cloud the const boost shared pointer to a PointCloud message

Reimplemented from pcl::SampleConsensusModel< PointT >.

Definition at line 88 of file sac_model_registration.h.

template<typename PointT>
void pcl::SampleConsensusModelRegistration< PointT >::setInputTarget ( const PointCloudConstPtr target,
const std::vector< int > &  indices_tgt 
) [inline]

Set the input point cloud target.

Parameters:
target the input point cloud target
indices_tgt a vector of point indices to be used from target

Definition at line 135 of file sac_model_registration.h.

template<typename PointT>
void pcl::SampleConsensusModelRegistration< PointT >::setInputTarget ( const PointCloudConstPtr target  )  [inline]

Set the input point cloud target.

Parameters:
target the input point cloud target

Definition at line 120 of file sac_model_registration.h.


Member Data Documentation

template<typename PointT>
IndicesPtr pcl::SampleConsensusModelRegistration< PointT >::indices_tgt_ [private]

A pointer to the vector of target point indices to use.

Definition at line 220 of file sac_model_registration.h.

template<typename PointT>
const int pcl::SampleConsensusModelRegistration< PointT >::MAX_ITERATIONS_COLLINEAR = 1000 [static, private]

Define the maximum number of iterations for collinearity checks.

Definition at line 226 of file sac_model_registration.h.

template<typename PointT>
double pcl::SampleConsensusModelRegistration< PointT >::sample_dist_thresh_ [private]

Internal distance threshold used for the sample selection step.

Definition at line 223 of file sac_model_registration.h.

template<typename PointT>
PointCloudConstPtr pcl::SampleConsensusModelRegistration< PointT >::target_ [private]

A boost shared pointer to the target point cloud data array.

Definition at line 217 of file sac_model_registration.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


pcl
Author(s): See http://pcl.ros.org/authors for the complete list of authors.
autogenerated on Fri Jan 11 09:57:23 2013