43 #include <pcl/sample_consensus/sac_model.h>
44 #include <pcl/sample_consensus/sac_model_sphere.h>
45 #include <pcl/sample_consensus/model_types.h>
46 #include <pcl/common/common.h>
47 #include <pcl/memory.h>
48 #include <pcl/pcl_macros.h>
69 template <
typename Po
intT,
typename Po
intNT>
89 using Ptr = shared_ptr<SampleConsensusModelNormalSphere<PointT, PointNT> >;
90 using ConstPtr = shared_ptr<const SampleConsensusModelNormalSphere<PointT, PointNT>>;
132 const double threshold,
142 const double threshold)
const override;
150 std::vector<double> &distances)
const override;
165 #ifdef PCL_NO_PRECOMPILE
166 #include <pcl/sample_consensus/impl/sac_model_normal_sphere.hpp>
std::vector< index_t > Indices
Type used for indices in PCL.
unsigned int model_size_
The number of coefficients in the model.
SampleConsensusModelNormalSphere defines a model for 3D sphere segmentation using additional surface ...
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
typename PointCloud::Ptr PointCloudPtr
SampleConsensusModelNormalSphere(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelNormalSphere.
~SampleConsensusModelNormalSphere()
Empty destructor.
typename pcl::PointCloud< PointNT >::ConstPtr PointCloudNConstPtr
SampleConsensusModel represents the base model class.
std::string model_name_
The model name.
void selectWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold, Indices &inliers) override
Select all the points which respect the given model coefficients as inliers.
typename PointCloud::ConstPtr PointCloudConstPtr
SampleConsensusModelFromNormals represents the base model class for models that require the use of su...
PointCloud represents the base class in PCL for storing collections of 3D points. ...
std::size_t countWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold) const override
Count all the points which respect the given model coefficients as inliers.
shared_ptr< const SampleConsensusModel< PointT > > ConstPtr
void getDistancesToModel(const Eigen::VectorXf &model_coefficients, std::vector< double > &distances) const override
Compute all distances from the cloud data to a given sphere model.
SampleConsensusModelNormalSphere(const PointCloudConstPtr &cloud, const Indices &indices, bool random=false)
Constructor for base SampleConsensusModelNormalSphere.
A point structure representing Euclidean xyz coordinates, and the RGB color.
shared_ptr< SampleConsensusModel< PointT > > Ptr
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_NORMAL_SPHERE).
typename pcl::PointCloud< PointNT >::Ptr PointCloudNPtr
SampleConsensusModelSphere defines a model for 3D sphere segmentation.
unsigned int sample_size_
The size of a sample from which the model is computed.