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