43 #include <pcl/features/feature.h> 57 template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT = ReferenceFrame>
61 using Ptr = shared_ptr<BOARDLocalReferenceFrameEstimation<PointInT, PointNT, PointOutT> >;
62 using ConstPtr = shared_ptr<const BOARDLocalReferenceFrameEstimation<PointInT, PointNT, PointOutT> >;
66 tangent_radius_ (0.0f),
68 margin_thresh_ (0.85f),
69 check_margin_array_size_ (24),
70 hole_size_prob_thresh_ (0.2f),
89 tangent_radius_ = radius;
99 return (tangent_radius_);
110 find_holes_ = find_holes;
121 return (find_holes_);
131 margin_thresh_ = margin_thresh;
141 return (margin_thresh_);
151 check_margin_array_size_ = size;
153 check_margin_array_.clear ();
154 check_margin_array_.resize (check_margin_array_size_);
156 margin_array_min_angle_.clear ();
157 margin_array_min_angle_.resize (check_margin_array_size_);
159 margin_array_max_angle_.clear ();
160 margin_array_max_angle_.resize (check_margin_array_size_);
162 margin_array_min_angle_normal_.clear ();
163 margin_array_min_angle_normal_.resize (check_margin_array_size_);
165 margin_array_max_angle_normal_.clear ();
166 margin_array_max_angle_normal_.resize (check_margin_array_size_);
176 return (check_margin_array_size_);
187 hole_size_prob_thresh_ = prob_thresh;
198 return (hole_size_prob_thresh_);
209 steep_thresh_ = steep_thresh;
220 return (steep_thresh_);
266 Eigen::Vector3f
const &point, Eigen::Vector3f &directed_ortho_axis);
286 Eigen::Vector3f &normal);
295 planeFitting (Eigen::Matrix<float, Eigen::Dynamic, 3>
const &points, Eigen::Vector3f ¢er,
296 Eigen::Vector3f &norm);
309 Eigen::Vector3f
const &plane_normal, Eigen::Vector3f &projected_point);
327 areEquals (
float val1,
float val2,
float zero_float_eps = 1E-8f)
const 329 return (std::abs (val1 - val2) < zero_float_eps);
334 float tangent_radius_;
340 float margin_thresh_;
343 int check_margin_array_size_;
346 float hole_size_prob_thresh_;
351 std::vector<bool> check_margin_array_;
352 std::vector<float> margin_array_min_angle_;
353 std::vector<float> margin_array_max_angle_;
354 std::vector<float> margin_array_min_angle_normal_;
355 std::vector<float> margin_array_max_angle_normal_;
359 #ifdef PCL_NO_PRECOMPILE 360 #include <pcl/features/impl/board.hpp>
~BOARDLocalReferenceFrameEstimation()
Empty destructor.
std::string feature_name_
The feature name.
void planeFitting(Eigen::Matrix< float, Eigen::Dynamic, 3 > const &points, Eigen::Vector3f ¢er, Eigen::Vector3f &norm)
Compute Least Square Plane Fitting in a set of 3D points.
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
BOARDLocalReferenceFrameEstimation()
Constructor.
float getSteepThresh() const
Gets the minimum steepness that the normals of the points situated on the borders of the hole...
void projectPointOnPlane(Eigen::Vector3f const &point, Eigen::Vector3f const &origin_point, Eigen::Vector3f const &plane_normal, Eigen::Vector3f &projected_point)
Given a plane (origin and normal) and a point, return the projection of x on plane.
float getAngleBetweenUnitVectors(Eigen::Vector3f const &v1, Eigen::Vector3f const &v2, Eigen::Vector3f const &axis)
return the angle (in radians) that rotate v1 to v2 with respect to axis .
shared_ptr< BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT > > Ptr
bool areEquals(float val1, float val2, float zero_float_eps=1E-8f) const
Check if val1 and val2 are equals.
void setMarginThresh(float margin_thresh)
Sets the percentage of the search radius (or tangent radius if set) after which a point is considered...
void randomOrthogonalAxis(Eigen::Vector3f const &axis, Eigen::Vector3f &rand_ortho_axis)
Given an axis, return a random orthogonal axis.
void setFindHoles(bool find_holes)
Sets whether holes in the margin of the support, for each point, are searched and accounted for in th...
Defines all the PCL implemented PointT point type structures.
shared_ptr< const BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT > > ConstPtr
float getMarginThresh() const
Gets the percentage of the search radius (or tangent radius if set) after which a point is considered...
void setSteepThresh(float steep_thresh)
Sets the minimum steepness that the normals of the points situated on the borders of the hole...
bool getFindHoles() const
Gets whether holes in the margin of the support, for each point, are searched and accounted for in th...
int getCheckMarginArraySize() const
Gets the number of slices in which is divided the margin for the search of missing regions...
void setHoleSizeProbThresh(float prob_thresh)
Given the angle width of a hole in the support margin, sets the minimum percentage of a circumference...
float computePointLRF(const int &index, Eigen::Matrix3f &lrf)
Estimate the LRF descriptor for a given point based on its spatial neighborhood of 3D points with nor...
void directedOrthogonalAxis(Eigen::Vector3f const &axis, Eigen::Vector3f const &axis_origin, Eigen::Vector3f const &point, Eigen::Vector3f &directed_ortho_axis)
Given an axis (with origin axis_origin), return the orthogonal axis directed to point.
float getTangentRadius() const
Get the maximum distance of the points used to estimate the x_axis and y_axis of the BOARD Reference ...
Feature represents the base feature class.
BOARDLocalReferenceFrameEstimation implements the BOrder Aware Repeatable Directions algorithm for lo...
typename Feature< PointInT, PointOutT >::PointCloudIn PointCloudIn
void normalDisambiguation(pcl::PointCloud< PointNT > const &normals_cloud, std::vector< int > const &normal_indices, Eigen::Vector3f &normal)
Disambiguates a normal direction using adjacent normals.
void computeFeature(PointCloudOut &output) override
Abstract feature estimation method.
float getHoleSizeProbThresh() const
Given the angle width of a hole in the support margin, gets the minimum percentage of a circumference...
void setTangentRadius(float radius)
Set the maximum distance of the points used to estimate the x_axis and y_axis of the BOARD Reference ...
void setCheckMarginArraySize(int size)
Sets the number of slices in which is divided the margin for the search of missing regions...