43 #include <pcl/sample_consensus/sac_model_plane.h>
64 template <
typename Po
intT>
74 using Ptr = shared_ptr<SampleConsensusModelParallelPlane<PointT> >;
75 using ConstPtr = shared_ptr<const SampleConsensusModelParallelPlane<PointT>>;
121 inline Eigen::Vector3f
142 const double threshold,
153 const double threshold)
const override;
161 std::vector<double> &distances)
const override;
175 isModelValid (
const Eigen::VectorXf &model_coefficients)
const override;
188 #ifdef PCL_NO_PRECOMPILE
189 #include <pcl/sample_consensus/impl/sac_model_parallel_plane.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
SampleConsensusModelParallelPlane defines a model for 3D plane segmentation using additional angular ...
double getEpsAngle() const
Get the angle epsilon (delta) threshold.
bool isModelValid(const Eigen::VectorXf &model_coefficients) const override
Check whether a model is valid given the user constraints.
~SampleConsensusModelParallelPlane() override=default
Empty destructor.
Eigen::Vector3f axis_
The axis along which we need to search for a plane perpendicular to.
double eps_angle_
The maximum allowed difference between the plane and the given axis.
double sin_angle_
The sine of the angle.
void setEpsAngle(const double ea)
Set the angle epsilon (delta) threshold.
SampleConsensusModelParallelPlane(const PointCloudConstPtr &cloud, const Indices &indices, bool random=false)
Constructor for base SampleConsensusModelParallelPlane.
Eigen::Vector3f getAxis() const
Get the axis along which we need to search for a plane perpendicular to.
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 getDistancesToModel(const Eigen::VectorXf &model_coefficients, std::vector< double > &distances) const override
Compute all distances from the cloud data to a given plane model.
SampleConsensusModelParallelPlane(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelParallelPlane.
void setAxis(const Eigen::Vector3f &ax)
Set the axis along which we need to search for a plane perpendicular to.
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_PARALLEL_PLANE).
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.
SampleConsensusModelPlane defines a model for 3D plane segmentation.
typename SampleConsensusModel< PointT >::PointCloud PointCloud
typename SampleConsensusModel< PointT >::PointCloudConstPtr PointCloudConstPtr
typename SampleConsensusModel< PointT >::PointCloudPtr PointCloudPtr
@ SACMODEL_PARALLEL_PLANE
IndicesAllocator<> Indices
Type used for indices in PCL.
A point structure representing Euclidean xyz coordinates, and the RGB color.