SampleConsensusModelNormalPlane 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. More...
#include <sac_model_normal_plane.h>
Public Types | |
typedef SampleConsensusModel < PointT >::PointCloud | PointCloud |
typedef SampleConsensusModel < PointT >::PointCloudConstPtr | PointCloudConstPtr |
typedef SampleConsensusModelFromNormals < PointT, PointNT > ::PointCloudNConstPtr | PointCloudNConstPtr |
typedef SampleConsensusModelFromNormals < PointT, PointNT > ::PointCloudNPtr | PointCloudNPtr |
typedef SampleConsensusModel < PointT >::PointCloudPtr | PointCloudPtr |
typedef boost::shared_ptr < SampleConsensusModelNormalPlane > | 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 cloud data to a given plane model. | |
pcl::SacModel | getModelType () const |
Return an unique id for this model (SACMODEL_NORMAL_PLANE). | |
SampleConsensusModelNormalPlane (const PointCloudConstPtr &cloud) | |
Constructor for base SampleConsensusModelNormalPlane. | |
SampleConsensusModelNormalPlane (const PointCloudConstPtr &cloud, const std::vector< int > &indices) | |
Constructor for base SampleConsensusModelNormalPlane. | |
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. | |
Protected Member Functions | |
bool | isModelValid (const Eigen::VectorXf &model_coefficients) |
Check whether a model is valid given the user constraints. |
SampleConsensusModelNormalPlane 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.
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); ...
Definition at line 75 of file sac_model_normal_plane.h.
typedef SampleConsensusModel<PointT>::PointCloud pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::PointCloud |
Reimplemented from pcl::SampleConsensusModelPlane< PointT >.
Definition at line 84 of file sac_model_normal_plane.h.
typedef SampleConsensusModel<PointT>::PointCloudConstPtr pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::PointCloudConstPtr |
Reimplemented from pcl::SampleConsensusModelPlane< PointT >.
Definition at line 86 of file sac_model_normal_plane.h.
typedef SampleConsensusModelFromNormals<PointT, PointNT>::PointCloudNConstPtr pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::PointCloudNConstPtr |
Reimplemented from pcl::SampleConsensusModelFromNormals< PointT, PointNT >.
Definition at line 89 of file sac_model_normal_plane.h.
typedef SampleConsensusModelFromNormals<PointT, PointNT>::PointCloudNPtr pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::PointCloudNPtr |
Reimplemented from pcl::SampleConsensusModelFromNormals< PointT, PointNT >.
Definition at line 88 of file sac_model_normal_plane.h.
typedef SampleConsensusModel<PointT>::PointCloudPtr pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::PointCloudPtr |
Reimplemented from pcl::SampleConsensusModelPlane< PointT >.
Definition at line 85 of file sac_model_normal_plane.h.
typedef boost::shared_ptr<SampleConsensusModelNormalPlane> pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::Ptr |
Reimplemented from pcl::SampleConsensusModelFromNormals< PointT, PointNT >.
Definition at line 91 of file sac_model_normal_plane.h.
pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::SampleConsensusModelNormalPlane | ( | const PointCloudConstPtr & | cloud | ) | [inline] |
Constructor for base SampleConsensusModelNormalPlane.
[in] | cloud | the input point cloud dataset |
Definition at line 96 of file sac_model_normal_plane.h.
pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::SampleConsensusModelNormalPlane | ( | const PointCloudConstPtr & | cloud, |
const std::vector< int > & | indices | ||
) | [inline] |
Constructor for base SampleConsensusModelNormalPlane.
[in] | cloud | the input point cloud dataset |
[in] | indices | a vector of point indices to be used from cloud |
Definition at line 104 of file sac_model_normal_plane.h.
int pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::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::SampleConsensusModelPlane< PointT >.
Definition at line 93 of file sac_model_normal_plane.hpp.
void pcl::SampleConsensusModelNormalPlane< 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.
[in] | model_coefficients | the coefficients of a plane model that we need to compute distances to |
[out] | distances | the resultant estimated distances |
Reimplemented from pcl::SampleConsensusModelPlane< PointT >.
Definition at line 133 of file sac_model_normal_plane.hpp.
pcl::SacModel pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::getModelType | ( | ) | const [inline, virtual] |
Return an unique id for this model (SACMODEL_NORMAL_PLANE).
Reimplemented from pcl::SampleConsensusModelPlane< PointT >.
Definition at line 138 of file sac_model_normal_plane.h.
bool pcl::SampleConsensusModelNormalPlane< PointT, PointNT >::isModelValid | ( | const Eigen::VectorXf & | model_coefficients | ) | [protected, virtual] |
Check whether a model is valid given the user constraints.
[in] | model_coefficients | the set of model coefficients |
Reimplemented from pcl::SampleConsensusModelPlane< PointT >.
Definition at line 174 of file sac_model_normal_plane.hpp.
void pcl::SampleConsensusModelNormalPlane< 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.
[in] | model_coefficients | the coefficients of a plane model that we need to compute distances to |
[in] | threshold | a maximum admissible distance threshold for determining the inliers from the outliers |
[out] | inliers | the resultant model inliers |
Reimplemented from pcl::SampleConsensusModelPlane< PointT >.
Definition at line 45 of file sac_model_normal_plane.hpp.