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_
boost::shared_ptr< BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT > > Ptr
boost::shared_ptr< const BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT > > ConstPtr
bool areEquals(float val1, float val2, float zero_float_eps=1E-8f) const
Check if val1 and val2 are equals.
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.
float getTangentRadius() const
Get the maximum distance of the points used to estimate the x_axis and y_axis of the BOARD Reference ...
float getHoleSizeProbThresh() const
Given the angle width of a hole in the support margin, gets the minimum percentage of a circumference...
BOARDLocalReferenceFrameEstimation()
Constructor.
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 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 .
int getCheckMarginArraySize() const
Gets the number of slices in which is divided the margin for the search of missing regions...
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...
bool getFindHoles() const
Gets whether holes in the margin of the support, for each point, are searched and accounted for in th...
Feature< PointInT, PointOutT >::PointCloudIn PointCloudIn
Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
virtual ~BOARDLocalReferenceFrameEstimation()
Empty destructor.
float getSteepThresh() const
Gets the minimum steepness that the normals of the points situated on the borders of the hole...
void setSteepThresh(float steep_thresh)
Sets the minimum steepness that the normals of the points situated on the borders of the hole...
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.
Feature represents the base feature class.
BOARDLocalReferenceFrameEstimation implements the BOrder Aware Repeatable Directions algorithm for lo...
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 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...
virtual void computeFeature(PointCloudOut &output)
Abstract feature estimation method.