41#ifndef PCL_FEATURES_IMPL_NORMAL_3D_H_
42#define PCL_FEATURES_IMPL_NORMAL_3D_H_
44#include <pcl/features/normal_3d.h>
47template <
typename Po
intInT,
typename Po
intOutT>
void
53 std::vector<float> nn_dists (
k_);
55 output.is_dense =
true;
60 for (std::size_t idx = 0; idx <
indices_->size (); ++idx)
63 !
computePointNormal (*
surface_, nn_indices, output[idx].normal[0], output[idx].normal[1], output[idx].normal[2], output[idx].curvature))
65 output[idx].normal[0] = output[idx].normal[1] = output[idx].normal[2] = output[idx].curvature = std::numeric_limits<float>::quiet_NaN ();
67 output.is_dense =
false;
72 output[idx].normal[0], output[idx].normal[1], output[idx].normal[2]);
79 for (std::size_t idx = 0; idx <
indices_->size (); ++idx)
83 !
computePointNormal (*
surface_, nn_indices, output[idx].normal[0], output[idx].normal[1], output[idx].normal[2], output[idx].curvature))
85 output[idx].normal[0] = output[idx].normal[1] = output[idx].normal[2] = output[idx].curvature = std::numeric_limits<float>::quiet_NaN ();
87 output.is_dense =
false;
92 output[idx].normal[0], output[idx].normal[1], output[idx].normal[2]);
98#define PCL_INSTANTIATE_NormalEstimation(T,NT) template class PCL_EXPORTS pcl::NormalEstimation<T,NT>;
double search_parameter_
The actual search parameter (from either search_radius_ or k_).
int searchForNeighbors(std::size_t index, double parameter, pcl::Indices &indices, std::vector< float > &distances) const
Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface ...
int k_
The number of K nearest neighbors to use for each point.
PointCloudInConstPtr surface_
An input point cloud describing the surface that is to be used for nearest neighbors estimation.
void computeFeature(PointCloudOut &output) override
Estimate normals for all points given in <setInputCloud (), setIndices ()> using the surface in setSe...
bool computePointNormal(const pcl::PointCloud< PointInT > &cloud, const pcl::Indices &indices, Eigen::Vector4f &plane_parameters, float &curvature)
Compute the Least-Squares plane fit for a given set of points, using their indices,...
float vpx_
Values describing the viewpoint ("pinhole" camera model assumed).
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
PointCloudConstPtr input_
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.
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...
IndicesAllocator<> Indices
Type used for indices in PCL.