Filling#

Filling

Parallel binary filling on arbitraily sized images.

border_indices(source)[source]#

Returns the flat indices of the border pixels in source

fill(source, sink=None, seeds=None, processes=None, verbose=False)[source]#

Fill binary holes.

Arguments

source: np.ndarray

Input source.

sink: np.ndarray or None

If None, a new array is allocated in memory.

seedsarray or None

An array of seed points for the fill operation. If None, the border indices of the source are used as seeds.

processes: int or None

How many CPU cores to use, None defaults to max

verbose: bool

Whether to print verbose output

Returns

sinkarray

Binary image with filled holes.