Point Cloud Library (PCL)
1.10.1
|
43 #include <pcl/sample_consensus/sac_model.h>
44 #include <pcl/sample_consensus/model_types.h>
45 #include <pcl/common/eigen.h>
61 template <
typename Po
intT>
96 const std::vector<int> &indices,
116 Eigen::VectorXf &model_coefficients)
const override;
124 std::vector<double> &distances)
const override;
133 const double threshold,
134 std::vector<int> &inliers)
override;
144 const double threshold)
const override;
154 const Eigen::VectorXf &model_coefficients,
155 Eigen::VectorXf &optimized_coefficients)
const override;
165 const Eigen::VectorXf &model_coefficients,
167 bool copy_data_fields =
true)
const override;
176 const Eigen::VectorXf &model_coefficients,
177 const double threshold)
const override;
192 isSampleGood (
const std::vector<int> &samples)
const override;
196 #ifdef PCL_NO_PRECOMPILE
197 #include <pcl/sample_consensus/impl/sac_model_line.hpp>
This file defines compatibility wrappers for low level I/O functions.
SampleConsensusModelLine(const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false)
Constructor for base SampleConsensusModelLine.
unsigned int sample_size_
The size of a sample from which the model is computed.
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.
SampleConsensusModelLine(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelLine.
SampleConsensusModelLine defines a model for 3D line segmentation.
bool computeModelCoefficients(const std::vector< int > &samples, Eigen::VectorXf &model_coefficients) const override
Check whether the given index samples can form a valid line model, compute the model coefficients fro...
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.
~SampleConsensusModelLine()
Empty destructor.
shared_ptr< const SampleConsensusModel< PointT > > ConstPtr
shared_ptr< SampleConsensusModel< PointT > > Ptr
std::string model_name_
The model name.
void optimizeModelCoefficients(const std::vector< int > &inliers, const Eigen::VectorXf &model_coefficients, Eigen::VectorXf &optimized_coefficients) const override
Recompute the line coefficients using the given inlier set and return them to the user.
typename PointCloud::ConstPtr PointCloudConstPtr
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_LINE).
void getDistancesToModel(const Eigen::VectorXf &model_coefficients, std::vector< double > &distances) const override
Compute all squared distances from the cloud data to a given line model.
typename PointCloud::Ptr PointCloudPtr
SampleConsensusModel represents the base model class.
bool isSampleGood(const std::vector< int > &samples) const override
Check if a sample of indices results in a good sample of points indices.
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 line model.
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.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
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 line model coefficients.