43 #include <pcl/point_types.h>
44 #include <pcl/features/feature.h>
58 template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT = ReferenceFrame>
62 typedef boost::shared_ptr<BOARDLocalReferenceFrameEstimation<PointInT, PointNT, PointOutT> >
Ptr;
63 typedef boost::shared_ptr<const BOARDLocalReferenceFrameEstimation<PointInT, PointNT, PointOutT> >
ConstPtr;
67 tangent_radius_ (0.0f),
69 margin_thresh_ (0.85f),
70 check_margin_array_size_ (24),
71 hole_size_prob_thresh_ (0.2f),
73 check_margin_array_ (),
74 margin_array_min_angle_ (),
75 margin_array_max_angle_ (),
76 margin_array_min_angle_normal_ (),
77 margin_array_max_angle_normal_ ()
95 tangent_radius_ = radius;
105 return (tangent_radius_);
116 find_holes_ = find_holes;
127 return (find_holes_);
137 margin_thresh_ = margin_thresh;
147 return (margin_thresh_);
157 check_margin_array_size_ = size;
159 check_margin_array_.clear ();
160 check_margin_array_.resize (check_margin_array_size_);
162 margin_array_min_angle_.clear ();
163 margin_array_min_angle_.resize (check_margin_array_size_);
165 margin_array_max_angle_.clear ();
166 margin_array_max_angle_.resize (check_margin_array_size_);
168 margin_array_min_angle_normal_.clear ();
169 margin_array_min_angle_normal_.resize (check_margin_array_size_);
171 margin_array_max_angle_normal_.clear ();
172 margin_array_max_angle_normal_.resize (check_margin_array_size_);
182 return (check_margin_array_size_);
193 hole_size_prob_thresh_ = prob_thresh;
204 return (hole_size_prob_thresh_);
215 steep_thresh_ = steep_thresh;
226 return (steep_thresh_);
272 Eigen::Vector3f
const &point, Eigen::Vector3f &directed_ortho_axis);
292 Eigen::Vector3f &normal);
301 planeFitting (Eigen::Matrix<float, Eigen::Dynamic, 3>
const &points, Eigen::Vector3f ¢er,
302 Eigen::Vector3f &norm);
315 Eigen::Vector3f
const &plane_normal, Eigen::Vector3f &projected_point);
333 areEquals (
float val1,
float val2,
float zero_float_eps = 1E-8f)
const
335 return (std::abs (val1 - val2) < zero_float_eps);
340 float tangent_radius_;
346 float margin_thresh_;
349 int check_margin_array_size_;
352 float hole_size_prob_thresh_;
357 std::vector<bool> check_margin_array_;
358 std::vector<float> margin_array_min_angle_;
359 std::vector<float> margin_array_max_angle_;
360 std::vector<float> margin_array_min_angle_normal_;
361 std::vector<float> margin_array_max_angle_normal_;
365 #ifdef PCL_NO_PRECOMPILE
366 #include <pcl/features/impl/board.hpp>
369 #endif //#ifndef PCL_BOARD_H_
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 setTangentRadius(float radius)
Set the maximum distance of the points used to estimate the x_axis and y_axis of the BOARD Reference ...
virtual void computeFeature(PointCloudOut &output)
Abstract feature estimation method.
float getTangentRadius() const
Get the maximum distance of the points used to estimate the x_axis and y_axis of the BOARD Reference ...
std::string feature_name_
The feature name.
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...
Feature represents the base feature class.
boost::shared_ptr< const BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT > > ConstPtr
void normalDisambiguation(pcl::PointCloud< PointNT > const &normals_cloud, std::vector< int > const &normal_indices, Eigen::Vector3f &normal)
Disambiguates a normal direction using adjacent normals.
float getHoleSizeProbThresh() const
Given the angle width of a hole in the support margin, gets the minimum percentage of a circumference...
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.
BOARDLocalReferenceFrameEstimation()
Constructor.
bool getFindHoles() const
Gets whether holes in the margin of the support, for each point, are searched and accounted for in th...
void setMarginThresh(float margin_thresh)
Sets the percentage of the search radius (or tangent radius if set) after which a point is considered...
void setHoleSizeProbThresh(float prob_thresh)
Given the angle width of a hole in the support margin, sets the minimum percentage of a circumference...
void randomOrthogonalAxis(Eigen::Vector3f const &axis, Eigen::Vector3f &rand_ortho_axis)
Given an axis, return a random orthogonal axis.
void setCheckMarginArraySize(int size)
Sets the number of slices in which is divided the margin for the search of missing regions...
boost::shared_ptr< BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT > > Ptr
float getSteepThresh() const
Gets the minimum steepness that the normals of the points situated on the borders of the hole...
Feature< PointInT, PointOutT >::PointCloudIn PointCloudIn
void setSteepThresh(float steep_thresh)
Sets 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...
bool areEquals(float val1, float val2, float zero_float_eps=1E-8f) const
Check if val1 and val2 are equals.
BOARDLocalReferenceFrameEstimation implements the BOrder Aware Repeatable Directions algorithm for lo...
float getMarginThresh() const
Gets the percentage of the search radius (or tangent radius if set) after which a point is considered...
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 setFindHoles(bool find_holes)
Sets whether holes in the margin of the support, for each point, are searched and accounted for in th...
virtual ~BOARDLocalReferenceFrameEstimation()
Empty destructor.
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.
Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut