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>
PointCloud represents the base class in PCL for storing collections of 3D points.
SampleConsensusModelFromNormals represents the base model class for models that require the use of su...
typename pcl::PointCloud< PointNT >::ConstPtr PointCloudNConstPtr
typename pcl::PointCloud< PointNT >::Ptr PointCloudNPtr
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
SampleConsensusModelNormalParallelPlane defines a model for 3D plane segmentation using additional su...
double getDistanceFromOrigin() const
Get the distance of the plane from the origin.
void setEpsDist(const double delta)
Set the distance epsilon (delta) threshold.
SampleConsensusModelNormalParallelPlane(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelNormalParallelPlane.
bool isModelValid(const Eigen::VectorXf &model_coefficients) const override
Check whether a model is valid given the user constraints.
void setDistanceFromOrigin(const double d)
Set the distance we expect the plane to be from the origin.
SampleConsensusModelNormalParallelPlane(const PointCloudConstPtr &cloud, const Indices &indices, bool random=false)
Constructor for base SampleConsensusModelNormalParallelPlane.
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_NORMAL_PARALLEL_PLANE).
~SampleConsensusModelNormalParallelPlane() override=default
Empty destructor.
double getEpsAngle() const
Get the angle epsilon (delta) threshold.
void setEpsAngle(const double ea)
Set the angle epsilon (delta) threshold.
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.
double getEpsDist() const
Get the distance epsilon (delta) threshold.
SampleConsensusModelNormalPlane defines a model for 3D plane segmentation using additional surface no...
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
@ SACMODEL_NORMAL_PARALLEL_PLANE
IndicesAllocator<> Indices
Type used for indices in PCL.
Defines all the PCL and non-PCL macros used.
A point structure representing Euclidean xyz coordinates, and the RGB color.