Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::SampleConsensusModelPerpendicularPlane< PointT > Class Template Reference

SampleConsensusModelPerpendicularPlane defines a model for 3D plane segmentation using additional angular constraints. The plane must be perpendicular to an user-specified axis (setAxis), up to an user-specified angle threshold (setEpsAngle). The model coefficients are defined as: More...

#include <sac_model_perpendicular_plane.h>

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

List of all members.

Public Types

typedef
SampleConsensusModelPlane
< PointT >::PointCloud 
PointCloud
typedef
SampleConsensusModelPlane
< PointT >::PointCloudConstPtr 
PointCloudConstPtr
typedef
SampleConsensusModelPlane
< PointT >::PointCloudPtr 
PointCloudPtr
typedef boost::shared_ptr
< SampleConsensusModelPerpendicularPlane
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.
Eigen::Vector3f getAxis ()
 Get the axis along which we need to search for a plane perpendicular to.
void getDistancesToModel (const Eigen::VectorXf &model_coefficients, std::vector< double > &distances)
 Compute all distances from the cloud data to a given plane model.
double getEpsAngle ()
 Get the angle epsilon (delta) threshold.
pcl::SacModel getModelType () const
 Return an unique id for this model (SACMODEL_PERPENDICULAR_PLANE).
 SampleConsensusModelPerpendicularPlane (const PointCloudConstPtr &cloud, bool random=false)
 Constructor for base SampleConsensusModelPerpendicularPlane.
 SampleConsensusModelPerpendicularPlane (const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false)
 Constructor for base SampleConsensusModelPerpendicularPlane.
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 setAxis (const Eigen::Vector3f &ax)
 Set the axis along which we need to search for a plane perpendicular to.
void setEpsAngle (const double ea)
 Set the angle epsilon (delta) threshold.
virtual ~SampleConsensusModelPerpendicularPlane ()
 Empty destructor.

Protected Member Functions

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

Protected Attributes

Eigen::Vector3f axis_
 The axis along which we need to search for a plane perpendicular to.
double eps_angle_
 The maximum allowed difference between the plane normal and the given axis.

Detailed Description

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

SampleConsensusModelPerpendicularPlane defines a model for 3D plane segmentation using additional angular constraints. The plane must be perpendicular to an user-specified axis (setAxis), up to an user-specified angle threshold (setEpsAngle). The model coefficients are defined as:

Code example for a plane model, perpendicular (within a 15 degrees tolerance) with the Z axis:

 SampleConsensusModelPerpendicularPlane<pcl::PointXYZ> model (cloud);
 model.setAxis (Eigen::Vector3f (0.0, 0.0, 1.0));
 model.setEpsAngle (pcl::deg2rad (15));
Note:
Please remember that you need to specify an angle > 0 in order to activate the axis-angle constraint!
Author:
Radu B. Rusu

Definition at line 71 of file sac_model_perpendicular_plane.h.


Member Typedef Documentation

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 74 of file sac_model_perpendicular_plane.h.

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 76 of file sac_model_perpendicular_plane.h.

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 75 of file sac_model_perpendicular_plane.h.

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

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 78 of file sac_model_perpendicular_plane.h.


Constructor & Destructor Documentation

template<typename PointT>
pcl::SampleConsensusModelPerpendicularPlane< PointT >::SampleConsensusModelPerpendicularPlane ( const PointCloudConstPtr cloud,
bool  random = false 
) [inline]

Constructor for base SampleConsensusModelPerpendicularPlane.

Parameters:
[in]cloudthe input point cloud dataset
[in]randomif true set the random seed to the current time, else set to 12345 (default: false)

Definition at line 84 of file sac_model_perpendicular_plane.h.

template<typename PointT>
pcl::SampleConsensusModelPerpendicularPlane< PointT >::SampleConsensusModelPerpendicularPlane ( const PointCloudConstPtr cloud,
const std::vector< int > &  indices,
bool  random = false 
) [inline]

Constructor for base SampleConsensusModelPerpendicularPlane.

Parameters:
[in]cloudthe input point cloud dataset
[in]indicesa vector of point indices to be used from cloud
[in]randomif true set the random seed to the current time, else set to 12345 (default: false)

Definition at line 97 of file sac_model_perpendicular_plane.h.

template<typename PointT>
virtual pcl::SampleConsensusModelPerpendicularPlane< PointT >::~SampleConsensusModelPerpendicularPlane ( ) [inline, virtual]

Empty destructor.

Definition at line 107 of file sac_model_perpendicular_plane.h.


Member Function Documentation

template<typename PointT >
int pcl::SampleConsensusModelPerpendicularPlane< PointT >::countWithinDistance ( const Eigen::VectorXf &  model_coefficients,
const double  threshold 
) [virtual]

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

Parameters:
[in]model_coefficientsthe coefficients of a model that we need to compute distances to
[in]thresholdmaximum admissible distance threshold for determining the inliers from the outliers
Returns:
the resultant number of inliers

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 63 of file sac_model_perpendicular_plane.hpp.

template<typename PointT>
Eigen::Vector3f pcl::SampleConsensusModelPerpendicularPlane< PointT >::getAxis ( ) [inline]

Get the axis along which we need to search for a plane perpendicular to.

Definition at line 117 of file sac_model_perpendicular_plane.h.

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

Compute all distances from the cloud data to a given plane model.

Parameters:
[in]model_coefficientsthe coefficients of a plane model that we need to compute distances to
[out]distancesthe resultant estimated distances

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 75 of file sac_model_perpendicular_plane.hpp.

template<typename PointT>
double pcl::SampleConsensusModelPerpendicularPlane< PointT >::getEpsAngle ( ) [inline]

Get the angle epsilon (delta) threshold.

Definition at line 128 of file sac_model_perpendicular_plane.h.

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

Return an unique id for this model (SACMODEL_PERPENDICULAR_PLANE).

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 160 of file sac_model_perpendicular_plane.h.

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

Check whether a model is valid given the user constraints.

Parameters:
[in]model_coefficientsthe set of model coefficients

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 90 of file sac_model_perpendicular_plane.hpp.

template<typename PointT >
void pcl::SampleConsensusModelPerpendicularPlane< 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.

Parameters:
[in]model_coefficientsthe coefficients of a plane model that we need to compute distances to
[in]thresholda maximum admissible distance threshold for determining the inliers from the outliers
[out]inliersthe resultant model inliers

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 48 of file sac_model_perpendicular_plane.hpp.

template<typename PointT>
void pcl::SampleConsensusModelPerpendicularPlane< PointT >::setAxis ( const Eigen::Vector3f &  ax) [inline]

Set the axis along which we need to search for a plane perpendicular to.

Parameters:
[in]axthe axis along which we need to search for a plane perpendicular to

Definition at line 113 of file sac_model_perpendicular_plane.h.

template<typename PointT>
void pcl::SampleConsensusModelPerpendicularPlane< PointT >::setEpsAngle ( const double  ea) [inline]

Set the angle epsilon (delta) threshold.

Parameters:
[in]eathe maximum allowed difference between the plane normal and the given axis.
Note:
You need to specify an angle > 0 in order to activate the axis-angle constraint!

Definition at line 124 of file sac_model_perpendicular_plane.h.


Member Data Documentation

template<typename PointT>
Eigen::Vector3f pcl::SampleConsensusModelPerpendicularPlane< PointT >::axis_ [protected]

The axis along which we need to search for a plane perpendicular to.

Definition at line 170 of file sac_model_perpendicular_plane.h.

template<typename PointT>
double pcl::SampleConsensusModelPerpendicularPlane< PointT >::eps_angle_ [protected]

The maximum allowed difference between the plane normal and the given axis.

Definition at line 173 of file sac_model_perpendicular_plane.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:43:35