Skip to main content

distance_transform_edt

Function distance_transform_edt 

Source
pub fn distance_transform_edt(
    mask: &Array2<bool>,
    sampling: Option<(f64, f64)>,
) -> Result<DistanceTransform, ErrorsJSL>
Expand description

The exact Euclidean distance transform of a binary image (SciPy’s distance_transform_edt): for each foreground (true) pixel, the distance to the nearest background (false) pixel, with pixel spacing sampling = (row spacing, column spacing) (default (1, 1)). Background pixels get 0. The image must contain at least one background pixel.