Point Cloud Library (PCL)
1.10.0
|
43 #include <pcl/sample_consensus/sac_model.h>
44 #include <pcl/sample_consensus/model_types.h>
45 #include <pcl/common/eigen.h>
63 template <
typename Po
intT>
101 const std::vector<int> &indices,
121 Eigen::VectorXf &model_coefficients)
const override;
129 std::vector<double> &distances)
const override;
138 const double threshold,
139 std::vector<int> &inliers)
override;
149 const double threshold)
const override;
159 const Eigen::VectorXf &model_coefficients,
160 Eigen::VectorXf &optimized_coefficients)
const override;
170 const Eigen::VectorXf &model_coefficients,
172 bool copy_data_fields =
true)
const override;
181 const Eigen::VectorXf &model_coefficients,
182 const double threshold)
const override;
197 isSampleGood (
const std::vector<int> &samples)
const override;
201 #ifdef PCL_NO_PRECOMPILE
202 #include <pcl/sample_consensus/impl/sac_model_stick.hpp>
This file defines compatibility wrappers for low level I/O functions.
bool computeModelCoefficients(const std::vector< int > &samples, Eigen::VectorXf &model_coefficients) const override
Check whether the given index samples can form a valid stick model, compute the model coefficients fr...
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.
unsigned int sample_size_
The size of a sample from which the model is computed.
bool doSamplesVerifyModel(const std::set< int > &indices, const Eigen::VectorXf &model_coefficients, const double threshold) const override
Verify whether a subset of indices verifies the given stick model coefficients.
unsigned int model_size_
The number of coefficients in the model.
PointCloud represents the base class in PCL for storing collections of 3D points.
A point structure representing Euclidean xyz coordinates, and the RGB color.
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_STICK).
void selectWithinDistance(const Eigen::VectorXf &model_coefficients, const double threshold, std::vector< int > &inliers) override
Select all the points which respect the given model coefficients as inliers.
SampleConsensusModelStick defines a model for 3D stick segmentation.
bool isSampleGood(const std::vector< int > &samples) const override
Check if a sample of indices results in a good sample of points indices.
shared_ptr< const SampleConsensusModel< PointT > > ConstPtr
shared_ptr< SampleConsensusModel< PointT > > Ptr
std::string model_name_
The model name.
typename PointCloud::ConstPtr PointCloudConstPtr
void optimizeModelCoefficients(const std::vector< int > &inliers, const Eigen::VectorXf &model_coefficients, Eigen::VectorXf &optimized_coefficients) const override
Recompute the stick coefficients using the given inlier set and return them to the user.
~SampleConsensusModelStick()
Empty destructor.
void projectPoints(const std::vector< int > &inliers, const Eigen::VectorXf &model_coefficients, PointCloud &projected_points, bool copy_data_fields=true) const override
Create a new point cloud with inliers projected onto the stick model.
typename PointCloud::Ptr PointCloudPtr
SampleConsensusModel represents the base model class.
SampleConsensusModelStick(const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false)
Constructor for base SampleConsensusModelStick.
void getDistancesToModel(const Eigen::VectorXf &model_coefficients, std::vector< double > &distances) const override
Compute all squared distances from the cloud data to a given stick model.
SampleConsensusModelStick(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelStick.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.