35 #ifndef PCL_RANGE_IMAGE_BORDER_EXTRACTOR_H_
36 #define PCL_RANGE_IMAGE_BORDER_EXTRACTOR_H_
41 #if defined BUILD_Maintainer && defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ > 3
42 #pragma GCC diagnostic ignored "-Weffc++"
48 template <
typename Po
intType>
67 normal (), neighborhood_mean (), eigen_values (), normal_no_jumps (),
68 neighborhood_mean_no_jumps (), eigen_values_no_jumps (), max_neighbor_distance_squared () {}
83 int left, right,
top, bottom;
89 Parameters () : max_no_of_threads(1), pixel_radius_borders (3), pixel_radius_plane_extraction (2), pixel_radius_border_direction (2),
90 minimum_border_probability (0.8f), pixel_radius_principal_curvature (2) {}
104 getObstacleBorderAngle (
const BorderTraits& border_traits);
117 setRangeImage (
const RangeImage* range_image);
127 getAnglesImageForBorderDirections ();
133 getAnglesImageForSurfaceChangeDirections ();
167 ShadowBorderIndices**
182 Parameters parameters_;
184 int range_image_size_during_extraction_;
185 float* border_scores_left_, * border_scores_right_, * border_scores_top_, * border_scores_bottom_;
186 LocalSurface** surface_structure_;
188 ShadowBorderIndices** shadow_border_informations_;
189 Eigen::Vector3f** border_directions_;
191 float* surface_change_scores_;
192 Eigen::Vector3f* surface_change_directions_;
206 getNeighborDistanceChangeScore (
const LocalSurface& local_surface,
int x,
int y,
207 int offset_x,
int offset_y,
int pixel_radius=1)
const;
218 getNormalBasedBorderScore (
const LocalSurface& local_surface,
int x,
int y,
219 int offset_x,
int offset_y)
const;
232 changeScoreAccordingToShadowBorderValue (
int x,
int y,
int offset_x,
int offset_y,
float* border_scores,
233 float* border_scores_other_direction,
int& shadow_border_idx)
const;
242 updatedScoreAccordingToNeighborValues (
int x,
int y,
const float* border_scores)
const;
249 updatedScoresAccordingToNeighborValues (
const float* border_scores)
const;
253 updateScoresAccordingToNeighborValues ();
266 checkPotentialBorder (
int x,
int y,
int offset_x,
int offset_y,
float* border_scores_left,
267 float* border_scores_right,
int& shadow_border_idx)
const;
279 checkIfMaximum (
int x,
int y,
int offset_x,
int offset_y,
float* border_scores,
int shadow_border_idx)
const;
283 findAndEvaluateShadowBorders ();
287 extractLocalSurfaceStructure ();
293 extractBorderScoreImages ();
307 calculateBorderDirection (
int x,
int y);
313 calculateBorderDirections ();
323 get3dDirection (
const BorderDescription& border_description, Eigen::Vector3f& direction,
324 const LocalSurface* local_surface=NULL);
335 calculateMainPrincipalCurvature (
int x,
int y,
int radius,
float& magnitude,
336 Eigen::Vector3f& main_direction)
const;
341 calculateSurfaceChanges ();
345 blurSurfaceChanges ();
359 #if defined BUILD_Maintainer && defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ > 3
360 #pragma GCC diagnostic warning "-Weffc++"
365 #endif //#ifndef PCL_RANGE_IMAGE_BORDER_EXTRACTOR_H_