39#ifndef PCL_FEATURES_LINEAR_LEAST_SQUARES_NORMAL_HPP_
40#define PCL_FEATURES_LINEAR_LEAST_SQUARES_NORMAL_HPP_
41#define EIGEN_II_METHOD 1
43#include <pcl/features/linear_least_squares_normal.h>
46template <
typename Po
intInT,
typename Po
intOutT>
52template <
typename Po
intInT,
typename Po
intOutT>
void
56 const float bad_point = std::numeric_limits<float>::quiet_NaN ();
58 const int width = input_->width;
59 const int height = input_->height;
64 const int index = y * width + x;
66 const float px = (*input_)[index].x;
67 const float py = (*input_)[index].y;
68 const float pz = (*input_)[index].z;
98 const int index2 = v * width + u;
100 const float qx = (*input_)[
index2].x;
101 const float qy = (*input_)[
index2].y;
102 const float qz = (*input_)[
index2].z;
104 if (std::isnan (
qx))
continue;
107 const float i =
qx -
px;
108 const float j =
qy -
py;
127 const float nx =
ddx;
128 const float ny =
ddy;
142 const float normInv = 1.0f / std::sqrt (length);
154template <
typename Po
intInT,
typename Po
intOutT>
void
157 const float bad_point = std::numeric_limits<float>::quiet_NaN ();
159 const int width = input_->width;
160 const int height = input_->height;
175 for (
int y = 0; y < height; ++y)
177 for (
int x = 0; x < width; ++x)
179 const int index = y * width + x;
181 const float px = (*input_)[index].x;
182 const float py = (*input_)[index].y;
183 const float pz = (*input_)[index].z;
185 if (std::isnan(
px))
continue;
209 const int index2 = v * width + u;
211 const float qx = (*input_)[
index2].x;
212 const float qy = (*input_)[
index2].y;
213 const float qz = (*input_)[
index2].z;
215 if (std::isnan(
qx))
continue;
218 const float i =
qx -
px;
219 const float j =
qy -
py;
240 const float nx =
ddx;
241 const float ny =
ddy;
255 const float normInv = 1.0f / std::sqrt (length);
266#define PCL_INSTANTIATE_LinearLeastSquaresNormalEstimation(T,NT) template class PCL_EXPORTS pcl::LinearLeastSquaresNormalEstimation<T,NT>;
Iterator class for point clouds with or without given indices.
void computePointNormal(const int pos_x, const int pos_y, PointOutT &normal)
Computes the normal at the specified position.
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
~LinearLeastSquaresNormalEstimation()
Destructor.
void computeFeature(PointCloudOut &output) override
Computes the normal for the complete cloud.