Point Cloud Library (PCL)  1.7.0
Public Types | Public Member Functions | Protected Member Functions
pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT > Class Template Reference

SampleConsensusModelNormalParallelPlane defines a model for 3D plane segmentation using additional surface normal constraints. More...

#include <pcl/sample_consensus/sac_model_normal_parallel_plane.h>

+ Inheritance diagram for pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >:

List of all members.

Public Types

typedef SampleConsensusModel
< PointT >::PointCloud 
PointCloud
typedef SampleConsensusModel
< PointT >::PointCloudPtr 
PointCloudPtr
typedef SampleConsensusModel
< PointT >::PointCloudConstPtr 
PointCloudConstPtr
typedef
SampleConsensusModelFromNormals
< PointT, PointNT >
::PointCloudNPtr 
PointCloudNPtr
typedef
SampleConsensusModelFromNormals
< PointT, PointNT >
::PointCloudNConstPtr 
PointCloudNConstPtr
typedef boost::shared_ptr
< SampleConsensusModelNormalParallelPlane
Ptr

Public Member Functions

 SampleConsensusModelNormalParallelPlane (const PointCloudConstPtr &cloud, bool random=false)
 Constructor for base SampleConsensusModelNormalParallelPlane.
 SampleConsensusModelNormalParallelPlane (const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false)
 Constructor for base SampleConsensusModelNormalParallelPlane.
virtual ~SampleConsensusModelNormalParallelPlane ()
 Empty destructor.
void setAxis (const Eigen::Vector3f &ax)
 Set the axis along which we need to search for a plane perpendicular to.
Eigen::Vector3f getAxis ()
 Get the axis along which we need to search for a plane perpendicular to.
void setEpsAngle (const double ea)
 Set the angle epsilon (delta) threshold.
double getEpsAngle ()
 Get the angle epsilon (delta) threshold.
void setDistanceFromOrigin (const double d)
 Set the distance we expect the plane to be from the origin.
double getDistanceFromOrigin ()
 Get the distance of the plane from the origin.
void setEpsDist (const double delta)
 Set the distance epsilon (delta) threshold.
double getEpsDist ()
 Get the distance epsilon (delta) threshold.
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.
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 cloud data to a given plane model.
pcl::SacModel getModelType () const
 Return an unique id for this model (SACMODEL_NORMAL_PARALLEL_PLANE).

Protected Member Functions

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

Detailed Description

template<typename PointT, typename PointNT>
class pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >

SampleConsensusModelNormalParallelPlane defines a model for 3D plane segmentation using additional surface normal constraints.

Basically this means that checking for inliers will not only involve a "distance to model" criterion, but also an additional "maximum angular deviation" between the plane's normal and the inlier points normals. In addition, the plane normal must lie parallel to an user-specified axis.

The model coefficients are defined as:

To set the influence of the surface normals in the inlier estimation process, set the normal weight (0.0-1.0), e.g.:

 SampleConsensusModelNormalPlane<pcl::PointXYZ, pcl::Normal> sac_model;
 ...
 sac_model.setNormalDistanceWeight (0.1);
 ...

In addition, the user can specify more constraints, such as:

Note:
Please remember that you need to specify an angle > 0 in order to activate the axis-angle constraint!
Author:
Radu B. Rusu and Jared Glover and Nico Blodow

Definition at line 86 of file sac_model_normal_parallel_plane.h.


Member Typedef Documentation

template<typename PointT, typename PointNT>
typedef SampleConsensusModel<PointT>::PointCloud pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::PointCloud

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 95 of file sac_model_normal_parallel_plane.h.

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 97 of file sac_model_normal_parallel_plane.h.

template<typename PointT, typename PointNT>
typedef SampleConsensusModelFromNormals<PointT, PointNT>::PointCloudNPtr pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::PointCloudNPtr
template<typename PointT, typename PointNT>
typedef SampleConsensusModel<PointT>::PointCloudPtr pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::PointCloudPtr

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 96 of file sac_model_normal_parallel_plane.h.

template<typename PointT, typename PointNT>
typedef boost::shared_ptr<SampleConsensusModelNormalParallelPlane> pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::Ptr

Constructor & Destructor Documentation

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

Constructor for base SampleConsensusModelNormalParallelPlane.

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 108 of file sac_model_normal_parallel_plane.h.

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

Constructor for base SampleConsensusModelNormalParallelPlane.

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 125 of file sac_model_normal_parallel_plane.h.

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

Empty destructor.

Definition at line 139 of file sac_model_normal_parallel_plane.h.


Member Function Documentation

template<typename PointT , typename PointNT >
int pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::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 99 of file sac_model_normal_parallel_plane.hpp.

References pcl::getAngle3D().

template<typename PointT, typename PointNT>
Eigen::Vector3f pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::getAxis ( ) [inline]

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

Definition at line 149 of file sac_model_normal_parallel_plane.h.

Referenced by pcl::SACSegmentationFromNormals< PointT, PointNT >::initSACModel().

template<typename PointT, typename PointNT>
double pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::getDistanceFromOrigin ( ) [inline]

Get the distance of the plane from the origin.

Definition at line 170 of file sac_model_normal_parallel_plane.h.

Referenced by pcl::SACSegmentationFromNormals< PointT, PointNT >::initSACModel().

template<typename PointT , typename PointNT >
void pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::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 139 of file sac_model_normal_parallel_plane.hpp.

References pcl::getAngle3D().

template<typename PointT, typename PointNT>
double pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::getEpsAngle ( ) [inline]

Get the angle epsilon (delta) threshold.

Definition at line 160 of file sac_model_normal_parallel_plane.h.

Referenced by pcl::SACSegmentationFromNormals< PointT, PointNT >::initSACModel().

template<typename PointT, typename PointNT>
double pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::getEpsDist ( ) [inline]

Get the distance epsilon (delta) threshold.

Definition at line 180 of file sac_model_normal_parallel_plane.h.

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

Return an unique id for this model (SACMODEL_NORMAL_PARALLEL_PLANE).

Reimplemented from pcl::SampleConsensusModelPlane< PointT >.

Definition at line 212 of file sac_model_normal_parallel_plane.h.

References pcl::SACMODEL_NORMAL_PARALLEL_PLANE.

template<typename PointT , typename PointNT >
bool pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::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 179 of file sac_model_normal_parallel_plane.hpp.

template<typename PointT , typename PointNT >
void pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::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_normal_parallel_plane.hpp.

References pcl::getAngle3D().

template<typename PointT, typename PointNT>
void pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::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 145 of file sac_model_normal_parallel_plane.h.

Referenced by pcl::SACSegmentationFromNormals< PointT, PointNT >::initSACModel().

template<typename PointT, typename PointNT>
void pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::setDistanceFromOrigin ( const double  d) [inline]

Set the distance we expect the plane to be from the origin.

Parameters:
[in]ddistance from the template plane to the origin

Definition at line 166 of file sac_model_normal_parallel_plane.h.

Referenced by pcl::SACSegmentationFromNormals< PointT, PointNT >::initSACModel().

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

Set the angle epsilon (delta) threshold.

Parameters:
[in]eathe maximum allowed deviation from 90 degrees 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 156 of file sac_model_normal_parallel_plane.h.

Referenced by pcl::SACSegmentationFromNormals< PointT, PointNT >::initSACModel().

template<typename PointT, typename PointNT>
void pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::setEpsDist ( const double  delta) [inline]

Set the distance epsilon (delta) threshold.

Parameters:
[in]deltathe maximum allowed deviation from the template distance from the origin

Definition at line 176 of file sac_model_normal_parallel_plane.h.


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