binary_closing

Function binary_closing 

Source
pub fn binary_closing<SM, SK>(
    mask: &ArrayBase<SM, Ix3>,
    kernel: &ArrayBase<SK, Ix3>,
    iterations: usize,
) -> Mask
where SM: Data<Elem = bool>, SK: Data<Elem = bool>,
Expand description

Binary closing of a 3D binary image.

The closing of an input image by a structuring element is the erosion of the dilation of the image by the structuring element.

Unlike other libraries, the border values of the:

  • dilation is always false, to avoid dilating the borders
  • erosion is always true, to avoid border effects
  • mask - Binary image to be closed.
  • kernel - Structuring element used for the closing.
  • iterations - The dilation step of the closing, then the erosion step are each repeated iterations times.