43 #include <pcl/sample_consensus/sac_model_normal_plane.h>
44 #include <pcl/sample_consensus/model_types.h>
45 #include <pcl/memory.h>
46 #include <pcl/pcl_macros.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>
double getEpsAngle() const
Get the angle epsilon (delta) threshold.
double getDistanceFromOrigin() const
Get the distance of the plane from the origin.
std::vector< index_t > Indices
Type used for indices in PCL.
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
double getEpsDist() const
Get the distance epsilon (delta) threshold.
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.
Eigen::Vector3f getAxis() const
Get the axis along which we need to search for a plane perpendicular to.
typename PointCloud::ConstPtr PointCloudConstPtr
bool isModelValid(const Eigen::VectorXf &model_coefficients) const override
Check whether a model is valid given the user constraints.
SampleConsensusModelFromNormals represents the base model class for models that require the use of su...
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
pcl::SacModel getModelType() const override
Return a unique id for this model (SACMODEL_NORMAL_PARALLEL_PLANE).
SampleConsensusModelNormalParallelPlane(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelNormalParallelPlane.
A point structure representing Euclidean xyz coordinates, and the RGB color.
shared_ptr< SampleConsensusModel< PointT > > Ptr
void setEpsDist(const double delta)
Set the distance epsilon (delta) threshold.
typename pcl::PointCloud< PointNT >::Ptr PointCloudNPtr
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.