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> >;
83 tangent_radius_ = radius;
93 return (tangent_radius_);
104 find_holes_ = find_holes;
115 return (find_holes_);
125 margin_thresh_ = margin_thresh;
135 return (margin_thresh_);
145 check_margin_array_size_ = size;
147 check_margin_array_.clear ();
148 check_margin_array_.resize (check_margin_array_size_);
150 margin_array_min_angle_.clear ();
151 margin_array_min_angle_.resize (check_margin_array_size_);
153 margin_array_max_angle_.clear ();
154 margin_array_max_angle_.resize (check_margin_array_size_);
156 margin_array_min_angle_normal_.clear ();
157 margin_array_min_angle_normal_.resize (check_margin_array_size_);
159 margin_array_max_angle_normal_.clear ();
160 margin_array_max_angle_normal_.resize (check_margin_array_size_);
170 return (check_margin_array_size_);
181 hole_size_prob_thresh_ = prob_thresh;
192 return (hole_size_prob_thresh_);
203 steep_thresh_ = steep_thresh;
214 return (steep_thresh_);
260 Eigen::Vector3f
const &point, Eigen::Vector3f &directed_ortho_axis);
280 Eigen::Vector3f &normal);
289 planeFitting (Eigen::Matrix<float, Eigen::Dynamic, 3>
const &points, Eigen::Vector3f ¢er,
290 Eigen::Vector3f &norm);
303 Eigen::Vector3f
const &plane_normal, Eigen::Vector3f &projected_point);
321 areEquals (
float val1,
float val2,
float zero_float_eps = 1E-8f)
const
323 return (std::abs (val1 - val2) < zero_float_eps);
328 float tangent_radius_{0.0f};
331 bool find_holes_{
false};
334 float margin_thresh_{0.85f};
337 int check_margin_array_size_{24};
340 float hole_size_prob_thresh_{0.2f};
343 float steep_thresh_{0.1f};
345 std::vector<bool> check_margin_array_;
346 std::vector<float> margin_array_min_angle_;
347 std::vector<float> margin_array_max_angle_;
348 std::vector<float> margin_array_min_angle_normal_;
349 std::vector<float> margin_array_max_angle_normal_;
353 #ifdef PCL_NO_PRECOMPILE
354 #include <pcl/features/impl/board.hpp>
BOARDLocalReferenceFrameEstimation implements the BOrder Aware Repeatable Directions algorithm for lo...
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...
float getTangentRadius() const
Get the maximum distance of the points used to estimate the x_axis and y_axis of the BOARD Reference ...
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.
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.
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 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
void setCheckMarginArraySize(int size)
Sets the number of slices in which is divided the margin for the search of missing regions.
void setTangentRadius(float radius)
Set the maximum distance of the points used to estimate the x_axis and y_axis of the BOARD Reference ...
float getMarginThresh() const
Gets the percentage of the search radius (or tangent radius if set) after which a point is considered...
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 .
void normalDisambiguation(pcl::PointCloud< PointNT > const &normals_cloud, pcl::Indices const &normal_indices, Eigen::Vector3f &normal)
Disambiguates a normal direction using adjacent normals.
~BOARDLocalReferenceFrameEstimation() override=default
Empty destructor.
BOARDLocalReferenceFrameEstimation()
Constructor.
void setMarginThresh(float margin_thresh)
Sets the percentage of the search radius (or tangent radius if set) after which a point is considered...
typename Feature< PointInT, PointOutT >::PointCloudIn PointCloudIn
float getSteepThresh() const
Gets the minimum steepness that the normals of the points situated on the borders of the hole,...
int getCheckMarginArraySize() const
Gets the number of slices in which is divided the margin for the search of missing regions.
shared_ptr< BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT > > Ptr
void computeFeature(PointCloudOut &output) override
Abstract feature estimation method.
void randomOrthogonalAxis(Eigen::Vector3f const &axis, Eigen::Vector3f &rand_ortho_axis)
Given an axis, return a random orthogonal axis.
bool areEquals(float val1, float val2, float zero_float_eps=1E-8f) const
Check if val1 and val2 are equals.
float getHoleSizeProbThresh() const
Given the angle width of a hole in the support margin, gets the minimum percentage of a circumference...
void setFindHoles(bool find_holes)
Sets whether holes in the margin of the support, for each point, are searched and accounted for in th...
shared_ptr< const BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT > > ConstPtr
Feature represents the base feature class.
std::string feature_name_
The feature name.
Defines all the PCL implemented PointT point type structures.
IndicesAllocator<> Indices
Type used for indices in PCL.