HighMap library (C++)
Loading...
Searching...
No Matches
morphology.cpp File Reference

Namespaces

namespace  hmap
 

Functions

Array hmap::area_remove (const Array &array, float threshold_size, float background_value=0.f, float fill_value=0.f)
 Remove connected components smaller than a given size threshold.
 
Array hmap::border (const Array &array, int ir)
 Apply a border algorithm to the input array using a square structure.
 
Array hmap::closing (const Array &array, int ir)
 Apply a closing algorithm to the input array using a square structure.
 
Array hmap::closing_by_reconstruction (const Array &array, int ir, float k_smooth_max=0.f)
 Apply closing by reconstruction to the input array.
 
Array hmap::contour_smoothing (const Array &array, int ir, float transition_ratio=0.1f)
 Smooth contour boundaries of segmented regions.
 
Array hmap::dilation (const Array &array, int ir)
 Apply a dilation algorithm to the input array using a square structure.
 
Array hmap::dilation_expand_border_only (const Array &array, int ir)
 Expand non-zero regions of an array by morphological dilation, while preserving the original non-zero values.
 
Array hmap::dilation_expand_min_value_border_only (const Array &array)
 
Array hmap::erosion (const Array &array, int ir)
 Apply an erosion algorithm to the input array using a square structure.
 
void hmap::flood_fill (Array &array, int i, int j, float fill_value=1.f, float background_value=0.f)
 Apply a flood fill algorithm to the input array.
 
Array hmap::morphological_black_hat (const Array &array, int ir)
 Apply a morphological black hat algorithm to the input array using a square structure.
 
Array hmap::morphological_gradient (const Array &array, int ir)
 Apply a morphological gradient algorithm to the input array using a square structure.
 
Array hmap::morphological_laplacian (const Array &array, int ir)
 Apply a morphological Laplacian operator to the input array using a square structure.
 
Array hmap::morphological_top_hat (const Array &array, int ir)
 Apply a morphological top hat algorithm to the input array using a square structure.
 
Array hmap::opening (const Array &array, int ir)
 Apply an opening algorithm to the input array using a square structure.
 
Array hmap::opening_by_reconstruction (const Array &array, int ir, float k_smooth_min=0.f)
 Apply opening by reconstruction to the input array.
 
Array hmap::reconstruction_by_dilation (const Array &marker, const Array &mask, int ir, float k_smooth_min=0.f)
 Perform morphological reconstruction by dilation.
 
Array hmap::reconstruction_by_erosion (const Array &marker, const Array &mask, int ir, float k_smooth_max=0.f)
 Perform morphological reconstruction by erosion.
 
void hmap::helper_thinning (Array &in, int iter)
 
Array hmap::relative_distance_from_skeleton (const Array &array, int ir_search, bool zero_at_borders=true, int ir_erosion=1)
 Computes the relative distance of each non-zero cell in a binary array from the skeleton and border.
 
Array hmap::skeleton (const Array &array, bool zero_at_borders=true)
 Computes the skeleton of a binary image using the Zhang-Suen skeletonization algorithm.