SampleConsensusModelRegistration2D defines a model for Point-To-Point registration outlier rejection using distances between 2D pixels. More...
#include <sac_model_registration_2d.h>
Public Types | |
typedef boost::shared_ptr < const SampleConsensusModelRegistration2D > | ConstPtr |
typedef pcl::SampleConsensusModel < PointT >::PointCloud | PointCloud |
typedef pcl::SampleConsensusModel < PointT >::PointCloudConstPtr | PointCloudConstPtr |
typedef pcl::SampleConsensusModel < PointT >::PointCloudPtr | PointCloudPtr |
typedef boost::shared_ptr < SampleConsensusModelRegistration2D > | Ptr |
Public Member Functions | |
virtual int | countWithinDistance (const Eigen::VectorXf &model_coefficients, const double threshold) |
Count all the points which respect the given model coefficients as inliers. | |
void | getDistancesToModel (const Eigen::VectorXf &model_coefficients, std::vector< double > &distances) |
Compute all distances from the transformed points to their correspondences. | |
Eigen::Matrix3f | getProjectionMatrix () const |
Get the camera projection matrix. | |
SampleConsensusModelRegistration2D (const PointCloudConstPtr &cloud, bool random=false) | |
Constructor for base SampleConsensusModelRegistration2D. | |
SampleConsensusModelRegistration2D (const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false) | |
Constructor for base SampleConsensusModelRegistration2D. | |
void | selectWithinDistance (const Eigen::VectorXf &model_coefficients, const double threshold, std::vector< int > &inliers) |
Select all the points which respect the given model coefficients as inliers. | |
void | setProjectionMatrix (const Eigen::Matrix3f &projection_matrix) |
Set the camera projection matrix. | |
virtual | ~SampleConsensusModelRegistration2D () |
Empty destructor. | |
Protected Member Functions | |
void | computeSampleDistanceThreshold (const PointCloudConstPtr &cloud) |
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud. | |
void | computeSampleDistanceThreshold (const PointCloudConstPtr &cloud, const std::vector< int > &indices) |
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud. | |
bool | isSampleGood (const std::vector< int > &samples) const |
Check if a sample of indices results in a good sample of points indices. | |
Private Attributes | |
Eigen::Matrix3f | projection_matrix_ |
Camera projection matrix. |
SampleConsensusModelRegistration2D defines a model for Point-To-Point registration outlier rejection using distances between 2D pixels.
Definition at line 51 of file sac_model_registration_2d.h.
typedef boost::shared_ptr<const SampleConsensusModelRegistration2D> pcl::SampleConsensusModelRegistration2D< PointT >::ConstPtr |
Reimplemented from pcl::SampleConsensusModel< PointT >.
Definition at line 68 of file sac_model_registration_2d.h.
typedef pcl::SampleConsensusModel<PointT>::PointCloud pcl::SampleConsensusModelRegistration2D< PointT >::PointCloud |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 63 of file sac_model_registration_2d.h.
typedef pcl::SampleConsensusModel<PointT>::PointCloudConstPtr pcl::SampleConsensusModelRegistration2D< PointT >::PointCloudConstPtr |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 65 of file sac_model_registration_2d.h.
typedef pcl::SampleConsensusModel<PointT>::PointCloudPtr pcl::SampleConsensusModelRegistration2D< PointT >::PointCloudPtr |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 64 of file sac_model_registration_2d.h.
typedef boost::shared_ptr<SampleConsensusModelRegistration2D> pcl::SampleConsensusModelRegistration2D< PointT >::Ptr |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 67 of file sac_model_registration_2d.h.
pcl::SampleConsensusModelRegistration2D< PointT >::SampleConsensusModelRegistration2D | ( | const PointCloudConstPtr & | cloud, |
bool | random = false |
||
) | [inline] |
Constructor for base SampleConsensusModelRegistration2D.
[in] | cloud | the input point cloud dataset |
[in] | random | if true set the random seed to the current time, else set to 12345 (default: false) |
Definition at line 74 of file sac_model_registration_2d.h.
pcl::SampleConsensusModelRegistration2D< PointT >::SampleConsensusModelRegistration2D | ( | const PointCloudConstPtr & | cloud, |
const std::vector< int > & | indices, | ||
bool | random = false |
||
) | [inline] |
Constructor for base SampleConsensusModelRegistration2D.
[in] | cloud | the input point cloud dataset |
[in] | indices | a vector of point indices to be used from cloud |
[in] | random | if true set the random seed to the current time, else set to 12345 (default: false) |
Definition at line 88 of file sac_model_registration_2d.h.
virtual pcl::SampleConsensusModelRegistration2D< PointT >::~SampleConsensusModelRegistration2D | ( | ) | [inline, virtual] |
Empty destructor.
Definition at line 99 of file sac_model_registration_2d.h.
void pcl::SampleConsensusModelRegistration2D< PointT >::computeSampleDistanceThreshold | ( | const PointCloudConstPtr & | cloud | ) | [inline, protected] |
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud.
[in] | cloud | the const boost shared pointer to a PointCloud message |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 154 of file sac_model_registration_2d.h.
void pcl::SampleConsensusModelRegistration2D< PointT >::computeSampleDistanceThreshold | ( | const PointCloudConstPtr & | cloud, |
const std::vector< int > & | indices | ||
) | [inline, protected] |
Computes an "optimal" sample distance threshold based on the principal directions of the input cloud.
[in] | cloud | the const boost shared pointer to a PointCloud message |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 182 of file sac_model_registration_2d.h.
int pcl::SampleConsensusModelRegistration2D< PointT >::countWithinDistance | ( | const Eigen::VectorXf & | model_coefficients, |
const double | threshold | ||
) | [virtual] |
Count all the points which respect the given model coefficients as inliers.
[in] | model_coefficients | the coefficients of a model that we need to compute distances to |
[in] | threshold | maximum admissible distance threshold for determining the inliers from the outliers |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 184 of file sac_model_registration_2d.hpp.
void pcl::SampleConsensusModelRegistration2D< PointT >::getDistancesToModel | ( | const Eigen::VectorXf & | model_coefficients, |
std::vector< double > & | distances | ||
) | [virtual] |
Compute all distances from the transformed points to their correspondences.
[in] | model_coefficients | the 4x4 transformation matrix |
[out] | distances | the resultant estimated distances |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 64 of file sac_model_registration_2d.hpp.
Eigen::Matrix3f pcl::SampleConsensusModelRegistration2D< PointT >::getProjectionMatrix | ( | ) | const [inline] |
Get the camera projection matrix.
Definition at line 138 of file sac_model_registration_2d.h.
bool pcl::SampleConsensusModelRegistration2D< PointT >::isSampleGood | ( | const std::vector< int > & | samples | ) | const [protected, virtual] |
Check if a sample of indices results in a good sample of points indices.
[in] | samples | the resultant index samples |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 47 of file sac_model_registration_2d.hpp.
void pcl::SampleConsensusModelRegistration2D< PointT >::selectWithinDistance | ( | const Eigen::VectorXf & | model_coefficients, |
const double | threshold, | ||
std::vector< int > & | inliers | ||
) | [virtual] |
Select all the points which respect the given model coefficients as inliers.
[in] | model_coefficients | the 4x4 transformation matrix |
[in] | threshold | a maximum admissible distance threshold for determining the inliers from the outliers |
[out] | inliers | the resultant model inliers |
Reimplemented from pcl::SampleConsensusModelRegistration< PointT >.
Definition at line 119 of file sac_model_registration_2d.hpp.
void pcl::SampleConsensusModelRegistration2D< PointT >::setProjectionMatrix | ( | const Eigen::Matrix3f & | projection_matrix | ) | [inline] |
Set the camera projection matrix.
[in] | projection_matrix | the camera projection matrix |
Definition at line 133 of file sac_model_registration_2d.h.
Eigen::Matrix3f pcl::SampleConsensusModelRegistration2D< PointT >::projection_matrix_ [private] |
Camera projection matrix.
Definition at line 207 of file sac_model_registration_2d.h.