43 #include <pcl/sample_consensus/sac_model_line.h>
64 template <
typename Po
intT>
74 using Ptr = shared_ptr<SampleConsensusModelParallelLine<PointT> >;
75 using ConstPtr = shared_ptr<const SampleConsensusModelParallelLine<PointT>>;
119 inline Eigen::Vector3f
138 const double threshold,
149 const double threshold)
const override;
157 std::vector<double> &distances)
const override;
171 isModelValid (
const Eigen::VectorXf &model_coefficients)
const override;
181 #ifdef PCL_NO_PRECOMPILE
182 #include <pcl/sample_consensus/impl/sac_model_parallel_line.hpp>
PointCloud represents the base class in PCL for storing collections of 3D points.
SampleConsensusModel represents the base model class.
shared_ptr< SampleConsensusModel< PointT > > Ptr
unsigned int sample_size_
The size of a sample from which the model is computed.
typename PointCloud::ConstPtr PointCloudConstPtr
std::string model_name_
The model name.
unsigned int model_size_
The number of coefficients in the model.
typename PointCloud::Ptr PointCloudPtr
shared_ptr< const SampleConsensusModel< PointT > > ConstPtr
SampleConsensusModelLine defines a model for 3D line segmentation.
typename SampleConsensusModel< PointT >::PointCloudPtr PointCloudPtr
typename SampleConsensusModel< PointT >::PointCloudConstPtr PointCloudConstPtr
typename SampleConsensusModel< PointT >::PointCloud PointCloud
SampleConsensusModelParallelLine defines a model for 3D line segmentation using additional angular co...
bool isModelValid(const Eigen::VectorXf &model_coefficients) const override
Check whether a model is valid given the user constraints.
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_PARALLEL_LINE).
SampleConsensusModelParallelLine(const PointCloudConstPtr &cloud, const Indices &indices, bool random=false)
Constructor for base SampleConsensusModelParallelLine.
double eps_angle_
The maximum allowed difference between the line direction and the given axis.
Eigen::Vector3f axis_
The axis along which we need to search for a line.
void setAxis(const Eigen::Vector3f &ax)
Set the axis along which we need to search for a line.
Eigen::Vector3f getAxis() const
Get the axis along which we need to search for a line.
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.
~SampleConsensusModelParallelLine() override=default
Empty destructor.
double getEpsAngle() const
Get the angle epsilon (delta) threshold (in radians).
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.
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.
void setEpsAngle(const double ea)
Set the angle epsilon (delta) threshold.
SampleConsensusModelParallelLine(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelParallelLine.
IndicesAllocator<> Indices
Type used for indices in PCL.
A point structure representing Euclidean xyz coordinates, and the RGB color.