39#ifndef PCL_FEATURES_IMPL_FLARE_H_
40#define PCL_FEATURES_IMPL_FLARE_H_
42#include <pcl/features/flare.h>
46template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT,
typename SignedDistanceT>
bool
51 PCL_ERROR (
"[pcl::%s::initCompute] Init failed.\n", getClassName ().
c_str ());
55 if (tangent_radius_ == 0.0f)
57 PCL_ERROR (
"[pcl::%s::initCompute] tangent_radius_ not set.\n", getClassName ().
c_str ());
62 if (!sampled_surface_)
64 fake_sampled_surface_ =
true;
65 sampled_surface_ = surface_;
69 PCL_WARN (
"[pcl::%s::initCompute] sampled_surface_ is not set even if sampled_tree_ is already set.", getClassName ().
c_str ());
70 PCL_WARN (
"sampled_tree_ will be rebuilt from surface_. Use sampled_surface_.\n");
77 if (sampled_surface_->isOrganized () && surface_->isOrganized () && input_->isOrganized ())
83 if (sampled_tree_->getInputCloud () != sampled_surface_)
84 sampled_tree_->setInputCloud (sampled_surface_);
90template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT,
typename SignedDistanceT>
bool
97 fake_surface_ =
false;
100 if (fake_sampled_surface_)
102 sampled_surface_.
reset ();
103 fake_sampled_surface_ =
false;
109template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT,
typename SignedDistanceT>
SignedDistanceT
111 Eigen::Matrix3f &
lrf)
113 Eigen::Vector3f x_axis, y_axis;
130 lrf.setConstant (std::numeric_limits<float>::quiet_NaN ());
131 return (std::numeric_limits<SignedDistanceT>::max ());
147 lrf.setConstant (std::numeric_limits<float>::quiet_NaN ());
148 return (std::numeric_limits<SignedDistanceT>::max ());
167 lrf.row (0).matrix () = x_axis;
168 lrf.row (1).matrix () = y_axis;
170 return (std::numeric_limits<SignedDistanceT>::max ());
181 const float radius2 = tangent_radius_ * tangent_radius_;
212 lrf.row (0).matrix () = x_axis;
213 lrf.row (1).matrix () = y_axis;
215 return (std::numeric_limits<SignedDistanceT>::max ());
223 lrf.row (0).matrix () = x_axis;
224 lrf.row (1).matrix () = y_axis;
232template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT,
typename SignedDistanceT>
void
236 if (this->getKSearch () != 0)
239 "[pcl::%s::computeFeature] Error! Search method set to k-neighborhood. Call setKSearch (0) and setRadiusSearch (radius) to use this class.\n",
240 getClassName ().
c_str ());
244 signed_distances_from_highest_points_.resize (indices_->size ());
252 if (signed_distances_from_highest_points_[
point_idx] == std::numeric_limits<SignedDistanceT>::max ())
257 rf.getXAxisVector3fMap () =
currentLrf.row (0);
258 rf.getYAxisVector3fMap () =
currentLrf.row (1);
259 rf.getZAxisVector3fMap () =
currentLrf.row (2);
263#define PCL_INSTANTIATE_FLARELocalReferenceFrameEstimation(T,NT,OutT,SdT) template class PCL_EXPORTS pcl::FLARELocalReferenceFrameEstimation<T,NT,OutT,SdT>;
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
bool deinitCompute() override
This method should get called after the actual computation is ended.
void computeFeature(PointCloudOut &output) override
Abstract feature estimation method.
bool initCompute() override
This method should get called before starting the actual computation.
SignedDistanceT 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...
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
OrganizedNeighbor is a class for optimized nearest neigbhor search in organized point clouds.
Defines some geometrical functions and utility functions.
Eigen::Vector3f projectedAsUnitVector(Eigen::Vector3f const &point, Eigen::Vector3f const &plane_origin, Eigen::Vector3f const &plane_normal)
Given a plane defined by plane_origin and plane_normal, find the unit vector pointing from plane_orig...
Eigen::Vector3f randomOrthogonalAxis(Eigen::Vector3f const &axis)
Define a random unit vector orthogonal to axis.
const Eigen::Map< const Eigen::Vector3f > Vector3fMapConst
bool isFinite(const PointT &pt)
Tests if the 3D components of a point are all finite param[in] pt point to be tested return true if f...