38 #ifndef PCL_INTEGRALIMAGE_BASED_NORMAL_ESTIMATOR_H_
39 #define PCL_INTEGRALIMAGE_BASED_NORMAL_ESTIMATOR_H_
46 #if defined BUILD_Maintainer && defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ > 3
47 #pragma GCC diagnostic ignored "-Weffc++"
54 template <
typename Po
intInT,
typename Po
intOutT>
97 , rect_width_ (0), rect_width_2_ (0), rect_width_4_ (0)
98 , rect_height_ (0), rect_height_2_ (0), rect_height_4_ (0)
99 , distance_threshold_ (0)
100 , integral_image_DX_ (false)
101 , integral_image_DY_ (false)
102 , integral_image_depth_ (false)
103 , integral_image_XYZ_ (true)
107 , distance_map_ (NULL)
108 , use_depth_dependent_smoothing_ (false)
109 , max_depth_change_factor_ (20.0f*0.001f)
110 , normal_smoothing_size_ (10.0f)
111 , init_covariance_matrix_ (false)
112 , init_average_3d_gradient_ (false)
113 , init_simple_3d_gradient_ (false)
114 , init_depth_change_ (false)
118 , use_sensor_origin_ (true)
120 feature_name_ =
"IntegralImagesNormalEstimation";
141 border_policy_ = border_policy;
151 computePointNormal (
const int pos_x,
const int pos_y,
const unsigned point_index, PointOutT &normal);
169 max_depth_change_factor_ = max_depth_change_factor;
179 normal_smoothing_size_ = normal_smoothing_size;
197 normal_estimation_method_ = normal_estimation_method;
206 use_depth_dependent_smoothing_ = use_depth_dependent_smoothing;
216 if (!cloud->isOrganized ())
218 PCL_ERROR (
"[pcl::IntegralImageNormalEstimation::setInputCloud] Input dataset is not organized (height = 1).\n");
222 init_covariance_matrix_ = init_average_3d_gradient_ = init_depth_change_ =
false;
224 if (use_sensor_origin_)
226 vpx_ = input_->sensor_origin_.coeff (0);
227 vpy_ = input_->sensor_origin_.coeff (1);
228 vpz_ = input_->sensor_origin_.coeff (2);
240 return (distance_map_);
254 use_sensor_origin_ =
false;
280 use_sensor_origin_ =
true;
283 vpx_ = input_->sensor_origin_.coeff (0);
284 vpy_ = input_->sensor_origin_.coeff (1);
285 vpz_ = input_->sensor_origin_.coeff (2);
329 float distance_threshold_;
349 float *distance_map_;
352 bool use_depth_dependent_smoothing_;
355 float max_depth_change_factor_;
358 float normal_smoothing_size_;
361 bool init_covariance_matrix_;
364 bool init_average_3d_gradient_;
367 bool init_simple_3d_gradient_;
370 bool init_depth_change_;
374 float vpx_, vpy_, vpz_;
377 bool use_sensor_origin_;
385 initCovarianceMatrixMethod ();
389 initAverage3DGradientMethod ();
393 initAverageDepthChangeMethod ();
397 initSimple3DGradientMethod ();
406 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
409 #if defined BUILD_Maintainer && defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ > 3
410 #pragma GCC diagnostic warning "-Weffc++"