41 #ifndef PCL_SAMPLE_CONSENSUS_MODEL_NORMALPARALLELPLANE_H_ 42 #define PCL_SAMPLE_CONSENSUS_MODEL_NORMALPARALLELPLANE_H_ 44 #include <pcl/sample_consensus/sac_model_normal_plane.h> 45 #include <pcl/sample_consensus/model_types.h> 83 template <
typename Po
intT,
typename Po
intNT>
101 typedef boost::shared_ptr<SampleConsensusModelNormalParallelPlane>
Ptr;
110 , axis_ (
Eigen::Vector4f::Zero ())
111 , distance_from_origin_ (0)
116 model_name_ =
"SampleConsensusModelNormalParallelPlane";
127 const std::vector<int> &indices,
130 , axis_ (
Eigen::Vector4f::Zero ())
131 , distance_from_origin_ (0)
136 model_name_ =
"SampleConsensusModelNormalParallelPlane";
148 setAxis (
const Eigen::Vector3f &ax) { axis_.head<3> () = ax; axis_.normalize ();}
151 inline Eigen::Vector3f
159 setEpsAngle (
const double ea) { eps_angle_ = ea; cos_angle_ = fabs (cos (ea));}
189 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
199 isModelValid (
const Eigen::VectorXf &model_coefficients);
203 Eigen::Vector4f axis_;
206 double distance_from_origin_;
218 #ifdef PCL_NO_PRECOMPILE 219 #include <pcl/sample_consensus/impl/sac_model_normal_parallel_plane.hpp> 222 #endif //#ifndef PCL_SAMPLE_CONSENSUS_MODEL_NORMALPARALLELPLANE_H_ SampleConsensusModel< PointT >::PointCloud PointCloud
double getEpsAngle()
Get the angle epsilon (delta) threshold.
double getEpsDist()
Get the distance epsilon (delta) threshold.
SampleConsensusModelFromNormals< PointT, PointNT >::PointCloudNConstPtr PointCloudNConstPtr
pcl::PointCloud< PointNT >::ConstPtr PointCloudNConstPtr
unsigned int model_size_
The number of coefficients in the model.
pcl::PointCloud< PointNT >::Ptr PointCloudNPtr
Eigen::Vector3f getAxis()
Get the axis along which we need to search for a plane perpendicular to.
double getDistanceFromOrigin()
Get the distance of the plane from the origin.
void setEpsAngle(const double ea)
Set the angle epsilon (delta) threshold.
SampleConsensusModel< PointT >::PointCloudPtr PointCloudPtr
SampleConsensusModelFromNormals< PointT, PointNT >::PointCloudNPtr PointCloudNPtr
boost::shared_ptr< SampleConsensusModelNormalParallelPlane > Ptr
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.
pcl::PointCloud< PointT >::Ptr PointCloudPtr
SampleConsensusModel< PointT >::PointCloudConstPtr PointCloudConstPtr
virtual bool isModelValid(const Eigen::VectorXf &model_coefficients)
Check whether a model is valid given the user constraints.
virtual ~SampleConsensusModelNormalParallelPlane()
Empty destructor.
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.
pcl::PointCloud< PointT >::ConstPtr PointCloudConstPtr
pcl::SacModel getModelType() const
Return an unique id for this model (SACMODEL_NORMAL_PARALLEL_PLANE).
SampleConsensusModelNormalParallelPlane(const PointCloudConstPtr &cloud, bool random=false)
Constructor for base SampleConsensusModelNormalParallelPlane.
SampleConsensusModelNormalParallelPlane(const PointCloudConstPtr &cloud, const std::vector< int > &indices, bool random=false)
Constructor for base SampleConsensusModelNormalParallelPlane.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setEpsDist(const double delta)
Set the distance epsilon (delta) threshold.
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.