41 #ifndef PCL_FEATURES_IMPL_NORMAL_3D_H_
42 #define PCL_FEATURES_IMPL_NORMAL_3D_H_
44 #include <pcl/features/normal_3d.h>
47 template <
typename Po
intInT,
typename Po
intOutT>
void
52 std::vector<int> nn_indices (k_);
53 std::vector<float> nn_dists (k_);
60 for (
size_t idx = 0; idx < indices_->size (); ++idx)
62 if (this->searchForNeighbors ((*indices_)[idx], search_parameter_, nn_indices, nn_dists) == 0)
64 output.
points[idx].normal[0] = output.
points[idx].normal[1] = output.
points[idx].normal[2] = output.
points[idx].curvature = std::numeric_limits<float>::quiet_NaN ();
71 output.
points[idx].normal[0], output.
points[idx].normal[1], output.
points[idx].normal[2], output.
points[idx].curvature);
74 output.
points[idx].normal[0], output.
points[idx].normal[1], output.
points[idx].normal[2]);
81 for (
size_t idx = 0; idx < indices_->size (); ++idx)
83 if (!
isFinite ((*input_)[(*indices_)[idx]]) ||
84 this->searchForNeighbors ((*indices_)[idx], search_parameter_, nn_indices, nn_dists) == 0)
86 output.
points[idx].normal[0] = output.
points[idx].normal[1] = output.
points[idx].normal[2] = output.
points[idx].curvature = std::numeric_limits<float>::quiet_NaN ();
93 output.
points[idx].normal[0], output.
points[idx].normal[1], output.
points[idx].normal[2], output.
points[idx].curvature);
96 output.
points[idx].normal[0], output.
points[idx].normal[1], output.
points[idx].normal[2]);
102 #define PCL_INSTANTIATE_NormalEstimation(T,NT) template class PCL_EXPORTS pcl::NormalEstimation<T,NT>;
104 #endif // PCL_FEATURES_IMPL_NORMAL_3D_H_
bool isFinite(const PointT &pt)
Tests if the 3D components of a point are all finite param[in] pt point to be tested.
std::vector< PointT, Eigen::aligned_allocator< PointT > > points
The point data.
void flipNormalTowardsViewpoint(const PointT &point, float vp_x, float vp_y, float vp_z, Eigen::Matrix< Scalar, 4, 1 > &normal)
Flip (in place) the estimated normal of a point towards a given viewpoint.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
void computeFeature(PointCloudOut &output)
Estimate normals for all points given in using the surface in setSe...
void computePointNormal(const pcl::PointCloud< PointT > &cloud, Eigen::Vector4f &plane_parameters, float &curvature)
Compute the Least-Squares plane fit for a given set of points, and return the estimated plane paramet...
bool is_dense
True if no points are invalid (e.g., have NaN or Inf values).