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.

BW2 = bwulterode(BW,method)
specifies the distance transform method.

BW2 = bwulterode(___,conn)
specifies the pixel connectivity.

Pixel connectivity, specified as one of the values in this table. The default
connectivity is 8 for 2-D images, and 26 for 3-D
images.

Value

Meaning

Two-Dimensional Connectivities

4-connected

Pixels are connected if their edges touch. The neighborhood of a pixel
are the adjacent pixels in the horizontal or vertical
direction.

8-connected

Pixels are connected if their edges or corners touch. The neighborhood
of a pixel are the adjacent pixels in the horizontal, vertical, or diagonal
direction.

Three-Dimensional Connectivities

6-connected

Pixels are connected if their faces touch. The neighborhood of a pixel
are the adjacent pixels in:

One of these directions: in, out, left, right, up, and
down

18-connected

Pixels are connected if their faces or edges touch. The neighborhood of
a pixel are the adjacent pixels in:

One of these directions: in, out, left, right, up, and
down

A combination of two directions, such as right-down or
in-up

26-connected

Pixels are connected if their faces, edges, or corners touch. The
neighborhood of a pixel are the adjacent pixels in:

One of these directions: in, out, left, right, up, and
down

A combination of two directions, such as right-down or
in-up

A combination of three directions, such as in-right-up or
in-left-down

For higher dimensions, bwulterode uses the default value
conndef(ndims(BW),'maximal').

Connectivity can also be
defined in a more general way for any dimension by specifying a 3-by-3-by- ... -by-3 matrix of
0s and 1s. The 1-valued elements
define neighborhood locations relative to the center element of conn. Note
that conn must be symmetric about its center element. See Specifying Custom Connectivities for more information.

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.