pub fn binary_dilation<D>(
input: &ArrayBase<OwnedRepr<bool>, D>,
structure: Option<&ArrayBase<OwnedRepr<bool>, D>>,
iterations: Option<usize>,
mask: Option<&ArrayBase<OwnedRepr<bool>, D>>,
border_value: Option<bool>,
origin: Option<&[isize]>,
brute_force: Option<bool>,
) -> Result<ArrayBase<OwnedRepr<bool>, D>, NdimageError>where
D: Dimension + 'static,Expand description
Dilate a binary array using a structuring element
Binary dilation adds pixels to the boundaries of regions of positive pixels, effectively expanding these regions.
§Arguments
input- Input binary arraystructure- Structuring element (if None, uses a box with connectivity 1)iterations- Number of times to apply the dilation (default: 1)mask- Mask array that limits the operation (if None, no mask is applied)border_value- Border value (default: false)origin- Origin of the structuring element (if None, uses the center)brute_force- Whether to use brute force algorithm (default: false)
§Returns
Result<Array<bool, D>>- Dilated array