dilate#
- rlemasklib.RLEMask.dilate(kernel_shape='circle', kernel_size=7, inplace=False)[source]#
Dilate a mask with a kernel of a given shape and size.
- Parameters:
kernel_shape – the shape of the kernel, either ‘circle’ or ‘square’
kernel_size – the size of the kernel
inplace – whether to perform the operation in place or to return a new object
- Returns:
The RLEMask object representing the dilated mask (self if inplace=True)
- Return type:
Examples
Dilate with a 5x5 square kernel:
.dilate(kernel_shape='square', kernel_size=5) ==See also
dilate3x3()for a 3x3 kernel.dilate5x5()for a 5x5 kernel.erode()