dilate_vertical#
- rlemasklib.RLEMask.dilate_vertical(up=0, down=0, inplace=False)[source]#
Dilate the mask vertically.
Every foreground pixel causes a given number of its upper and lower neighbors to be set as foreground.
- Parameters:
- Returns:
The RLEMask object representing the dilated mask (self if inplace=True)
- Return type:
Examples
Dilate 1 pixel up and 2 pixels down:
.dilate_vertical(up=1, down=2) ==