You are here : matlabImage Processingbwulterode

bwulterode() - Image Processing

BW2 = bwulterode(BW) computes
the ultimate erosion of the binary image BW. The
ultimate erosion of BW consists of the regional
maxima of the Euclidean distance transform of the complement of BW.
The default connectivity for computing the regional maxima is 8 for
two dimensions, 26 for three dimensions, and conndef(ndims(BW),
'maximal') for higher dimensions.BW2 = bwulterode(BW,method,conn) specifies
the distance transform method and the regional maxima connectivity. method can
be one of the strings 'euclidean', 'cityblock', 'chessboard',
and 'quasi-euclidean'.conn can have any of the following scalar
values.ValueMeaning
Two-dimensional
connectivities
44-connected neighborhood
88-connected neighborhood
Three-dimensional
connectivities
66-connected neighborhood
1818-connected neighborhood
2626-connected neighborhood
Connectivity can be defined in a more general way for any dimension
by using for conn a 3-by-3-by... - by-3 matrix
of 0's and 1's. The 1-valued
elements define neighborhood locations relative to the center element
of conn. Note that conn must
be symmetric about its center element.


Syntax

BW2 = bwulterode(BW)BW2 = bwulterode(BW,method,conn)


Example

originalBW = imread('circles.png');
imshow(originalBW)
ultimateErosion = bwulterode(originalBW);
figure, imshow(ultimateErosion)


Output / Return Value


Limitations


Alternatives / See Also


Reference