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/memory.h>
47 #include <pcl/pcl_macros.h>
68 template <
typename Po
intT,
typename Po
intNT>
88 using Ptr = shared_ptr<SampleConsensusModelNormalSphere<PointT, PointNT> >;
89 using ConstPtr = shared_ptr<const SampleConsensusModelNormalSphere<PointT, PointNT>>;
131 const double threshold,
141 const double threshold)
const override;
149 std::vector<double> &distances)
const override;
164 #ifdef PCL_NO_PRECOMPILE
165 #include <pcl/sample_consensus/impl/sac_model_normal_sphere.hpp>
~SampleConsensusModelNormalSphere() override=default
Empty destructor.
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.
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...
IndicesAllocator<> Indices
Type used for indices in PCL.
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.