43 #include <pcl/sample_consensus/sac_model_plane.h>
69 template <
typename Po
intT>
79 using Ptr = shared_ptr<SampleConsensusModelPerpendicularPlane<PointT> >;
80 using ConstPtr = shared_ptr<const SampleConsensusModelPerpendicularPlane<PointT>>;
92 model_name_ =
"SampleConsensusModelPerpendicularPlane";
109 model_name_ =
"SampleConsensusModelPerpendicularPlane";
124 inline Eigen::Vector3f
145 const double threshold,
156 const double threshold)
const override;
164 std::vector<double> &distances)
const override;
178 isModelValid (
const Eigen::VectorXf &model_coefficients)
const override;
188 #ifdef PCL_NO_PRECOMPILE
189 #include <pcl/sample_consensus/impl/sac_model_perpendicular_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
SampleConsensusModelPerpendicularPlane defines a model for 3D plane segmentation using additional ang...
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.
~SampleConsensusModelPerpendicularPlane() override=default
Empty destructor.
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_PERPENDICULAR_PLANE).
Eigen::Vector3f getAxis() const
Get the axis along which we need to search for a plane perpendicular to.
double eps_angle_
The maximum allowed difference between the plane normal and the given axis.
void setAxis(const Eigen::Vector3f &ax)
Set the axis along which we need to search for a plane perpendicular to.
double getEpsAngle() const
Get the angle epsilon (delta) threshold.
SampleConsensusModelPerpendicularPlane(const PointCloudConstPtr &cloud, const Indices &indices, bool random=false)
Constructor for base SampleConsensusModelPerpendicularPlane.
bool isModelValid(const Eigen::VectorXf &model_coefficients) const override
Check whether a model is valid given the user constraints.
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.
void setEpsAngle(const double ea)
Set the angle epsilon (delta) threshold.
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.
Eigen::Vector3f axis_
The axis along which we need to search for a plane perpendicular to.
SampleConsensusModelPerpendicularPlane(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelPerpendicularPlane.
SampleConsensusModelPlane defines a model for 3D plane segmentation.
typename SampleConsensusModel< PointT >::PointCloud PointCloud
typename SampleConsensusModel< PointT >::PointCloudConstPtr PointCloudConstPtr
typename SampleConsensusModel< PointT >::PointCloudPtr PointCloudPtr
@ SACMODEL_PERPENDICULAR_PLANE
IndicesAllocator<> Indices
Type used for indices in PCL.
A point structure representing Euclidean xyz coordinates, and the RGB color.