dilate5x5#
- rlemasklib.RLEMask.dilate5x5(inplace=False)[source]#
Dilate a mask with a round 5x5 kernel.
The kernel is 0 in the four corners, otherwise 1:
Kernel:At the image border, pixels are treated as if the mask was extended by replicating the edge values. This means dilation does not extend beyond the image boundary.
- Parameters:
inplace (bool) – 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
A single pixel dilates into the kernel shape:
.dilate5x5() ==See also
dilate()for arbitrary kernel shapes.dilate3x3()for a 3x3 kernel.