fill_small_holes#
- rlemasklib.RLEMask.fill_small_holes(min_size=1, connectivity=4, inplace=False)[source]#
Fill small holes (i.e., connected components of the background) in the mask.
- Parameters:
- Returns:
A new RLEMask object with small holes filled.
- Return type:
Examples
Fill holes smaller than 2 pixels (1-pixel holes get filled, 3-pixel hole stays):
.fill_small_holes(min_size=2) ==See also