imfill
Fill image regions and holes
Syntax
Description
displays the binary image BW2
= imfill(BW
)BW
on the screen and lets
you define the region to fill by selecting points interactively with the
mouse. To use this syntax, BW
must be a 2-D
image.
Press Backspace or Delete to remove the previously selected point. Shift-click, right-click, or double-click to select a final point and start the fill operation. Press Return to finish the selection without adding a point.
[
returns the locations of points selected interactively in
BW2
, locations_out
] = imfill(BW
)locations_out
. To use this syntax,
BW
must be a 2-D image.
Examples
Input Arguments
Output Arguments
Algorithms
imfill
uses an algorithm based on morphological
reconstruction [1].
References
[1] Soille, P., Morphological Image Analysis: Principles and Applications, Springer-Verlag, 1999, pp. 173–174.