pub fn binary_erosion(
image: &Array2<bool>,
structure: &Array2<bool>,
iterations: usize,
) -> Result<Array2<bool>, ErrorsJSL>Expand description
Binary erosion: a pixel stays on only if every element of structure, centred on it, lies on
the foreground. Pixels beyond the image count as background, so objects touching the edge are
eroded from it (SciPy’s binary_erosion with border_value=0). iterations repeats the
operation; 0 repeats until the image stops changing.