SampleConsensusModelNormalSphere defines a model for 3D sphere 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 sphere's normal and the inlier points normals. More...
#include <sac_model_normal_sphere.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 < SampleConsensusModelNormalSphere > | 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 sphere model. | |
pcl::SacModel | getModelType () const |
Return an unique id for this model (SACMODEL_NORMAL_SPHERE). | |
SampleConsensusModelNormalSphere (const PointCloudConstPtr &cloud, bool random=false) | |
Constructor for base SampleConsensusModelNormalSphere. | |
SampleConsensusModelNormalSphere (const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false) | |
Constructor for base SampleConsensusModelNormalSphere. | |
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 | ~SampleConsensusModelNormalSphere () |
Empty destructor. | |
Protected Member Functions | |
bool | isModelValid (const Eigen::VectorXf &model_coefficients) |
Check whether a model is valid given the user constraints. |
SampleConsensusModelNormalSphere defines a model for 3D sphere 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 sphere's normal and the inlier points normals.
The model coefficients are defined as:
Definition at line 69 of file sac_model_normal_sphere.h.
typedef SampleConsensusModel<PointT>::PointCloud pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::PointCloud |
Reimplemented from pcl::SampleConsensusModelSphere< PointT >.
Definition at line 80 of file sac_model_normal_sphere.h.
typedef SampleConsensusModel<PointT>::PointCloudConstPtr pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::PointCloudConstPtr |
Reimplemented from pcl::SampleConsensusModelSphere< PointT >.
Definition at line 82 of file sac_model_normal_sphere.h.
typedef SampleConsensusModelFromNormals<PointT, PointNT>::PointCloudNConstPtr pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::PointCloudNConstPtr |
Reimplemented from pcl::SampleConsensusModelFromNormals< PointT, PointNT >.
Definition at line 85 of file sac_model_normal_sphere.h.
typedef SampleConsensusModelFromNormals<PointT, PointNT>::PointCloudNPtr pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::PointCloudNPtr |
Reimplemented from pcl::SampleConsensusModelFromNormals< PointT, PointNT >.
Definition at line 84 of file sac_model_normal_sphere.h.
typedef SampleConsensusModel<PointT>::PointCloudPtr pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::PointCloudPtr |
Reimplemented from pcl::SampleConsensusModelSphere< PointT >.
Definition at line 81 of file sac_model_normal_sphere.h.
typedef boost::shared_ptr<SampleConsensusModelNormalSphere> pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::Ptr |
Reimplemented from pcl::SampleConsensusModelFromNormals< PointT, PointNT >.
Definition at line 87 of file sac_model_normal_sphere.h.
pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::SampleConsensusModelNormalSphere | ( | const PointCloudConstPtr & | cloud, |
bool | random = false |
||
) | [inline] |
Constructor for base SampleConsensusModelNormalSphere.
[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 93 of file sac_model_normal_sphere.h.
pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::SampleConsensusModelNormalSphere | ( | const PointCloudConstPtr & | cloud, |
const std::vector< int > & | indices, | ||
bool | random = false |
||
) | [inline] |
Constructor for base SampleConsensusModelNormalSphere.
[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 105 of file sac_model_normal_sphere.h.
virtual pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::~SampleConsensusModelNormalSphere | ( | ) | [inline, virtual] |
Empty destructor.
Definition at line 114 of file sac_model_normal_sphere.h.
int pcl::SampleConsensusModelNormalSphere< 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::SampleConsensusModelSphere< PointT >.
Definition at line 110 of file sac_model_normal_sphere.hpp.
void pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::getDistancesToModel | ( | const Eigen::VectorXf & | model_coefficients, |
std::vector< double > & | distances | ||
) | [virtual] |
Compute all distances from the cloud data to a given sphere model.
[in] | model_coefficients | the coefficients of a sphere model that we need to compute distances to |
[out] | distances | the resultant estimated distances |
Reimplemented from pcl::SampleConsensusModelSphere< PointT >.
Definition at line 160 of file sac_model_normal_sphere.hpp.
pcl::SacModel pcl::SampleConsensusModelNormalSphere< PointT, PointNT >::getModelType | ( | ) | const [inline, virtual] |
Return an unique id for this model (SACMODEL_NORMAL_SPHERE).
Reimplemented from pcl::SampleConsensusModelSphere< PointT >.
Definition at line 145 of file sac_model_normal_sphere.h.
bool pcl::SampleConsensusModelNormalSphere< 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::SampleConsensusModelSphere< PointT >.
Definition at line 210 of file sac_model_normal_sphere.hpp.
void pcl::SampleConsensusModelNormalSphere< 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 sphere 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::SampleConsensusModelSphere< PointT >.
Definition at line 48 of file sac_model_normal_sphere.hpp.