Point Cloud Library (PCL)
1.11.1-dev
|
43 #include <pcl/sample_consensus/sac_model_normal_plane.h>
44 #include <pcl/sample_consensus/model_types.h>
85 template <
typename Po
intT,
typename Po
intNT>
103 using Ptr = shared_ptr<SampleConsensusModelNormalParallelPlane<PointT, PointNT> >;
104 using ConstPtr = shared_ptr<const SampleConsensusModelNormalParallelPlane<PointT, PointNT>>;
113 , axis_ (
Eigen::Vector4f::Zero ())
114 , distance_from_origin_ (0)
119 model_name_ =
"SampleConsensusModelNormalParallelPlane";
133 , axis_ (
Eigen::Vector4f::Zero ())
134 , distance_from_origin_ (0)
139 model_name_ =
"SampleConsensusModelNormalParallelPlane";
151 setAxis (
const Eigen::Vector3f &ax) { axis_.head<3> () = ax; axis_.normalize ();}
154 inline Eigen::Vector3f
155 getAxis ()
const {
return (axis_.head<3> ()); }
162 setEpsAngle (
const double ea) { eps_angle_ = ea; cos_angle_ = std::abs (std::cos (ea));}
202 isModelValid (
const Eigen::VectorXf &model_coefficients)
const override;
206 Eigen::Vector4f axis_;
209 double distance_from_origin_;
221 #ifdef PCL_NO_PRECOMPILE
222 #include <pcl/sample_consensus/impl/sac_model_normal_parallel_plane.hpp>
Defines all the PCL and non-PCL macros used.
SampleConsensusModelFromNormals represents the base model class for models that require the use of su...
double getDistanceFromOrigin() const
Get the distance of the plane from the origin.
unsigned int sample_size_
The size of a sample from which the model is computed.
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_NORMAL_PARALLEL_PLANE).
SampleConsensusModelNormalPlane defines a model for 3D plane segmentation using additional surface no...
unsigned int model_size_
The number of coefficients in the model.
double getEpsDist() const
Get the distance epsilon (delta) threshold.
PointCloud represents the base class in PCL for storing collections of 3D points.
SampleConsensusModelNormalParallelPlane(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelNormalParallelPlane.
A point structure representing Euclidean xyz coordinates, and the RGB color.
@ SACMODEL_NORMAL_PARALLEL_PLANE
void setEpsDist(const double delta)
Set the distance epsilon (delta) threshold.
double getEpsAngle() const
Get the angle epsilon (delta) threshold.
shared_ptr< const SampleConsensusModel< PointT > > ConstPtr
typename pcl::PointCloud< PointNT >::Ptr PointCloudNPtr
typename pcl::PointCloud< PointNT >::ConstPtr PointCloudNConstPtr
SampleConsensusModelNormalParallelPlane defines a model for 3D plane segmentation using additional su...
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
shared_ptr< SampleConsensusModel< PointT > > Ptr
std::string model_name_
The model name.
IndicesAllocator<> Indices
Type used for indices in PCL.
typename PointCloud::ConstPtr PointCloudConstPtr
~SampleConsensusModelNormalParallelPlane()
Empty destructor.
SampleConsensusModelNormalParallelPlane(const PointCloudConstPtr &cloud, const Indices &indices, bool random=false)
Constructor for base SampleConsensusModelNormalParallelPlane.
void setEpsAngle(const double ea)
Set the angle epsilon (delta) threshold.
typename PointCloud::Ptr PointCloudPtr
SampleConsensusModel represents the base model class.
void setDistanceFromOrigin(const double d)
Set the distance we expect the plane to be from the origin.
bool isModelValid(const Eigen::VectorXf &model_coefficients) const override
Check whether a model is valid given the user constraints.
Defines functions, macros and traits for allocating and using memory.
Eigen::Vector3f getAxis() const
Get the axis along which we need to search for a plane perpendicular to.
void setAxis(const Eigen::Vector3f &ax)
Set the axis along which we need to search for a plane perpendicular to.