Input image, specified as a numeric or logical array.
Example:
se = strel('disk',5); marker = imerode(mask,se);
Rob Costlow RECONSTRUCTION CD. Get it in time for Christmas! Check shipping cutoff dates. Rob Costlow RECONSTRUCTION CD. Get it in time for Christmas! Check shipping cutoff dates. Product Details.
Data Types:
single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
Mask image, specified as a numeric or logical array of the same size and data type as
marker
.Example:
mask = imread('text.png');
Data Types:
single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
conn
— Pixel connectivity
4
| 8
| 6
| 18
| 26
| 3-by-3-by- ... -by-3 matrix of 0
s and 1
s
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:
| |
18-connected | Pixels are connected if their faces or edges touch. The neighborhood of a pixel are the adjacent pixels in:
| |
26-connected | Pixels are connected if their faces, edges, or corners touch. The neighborhood of a pixel are the adjacent pixels in:
|
For higher dimensions,
imreconstruct
uses the default value conndef
(ndims(marker),'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
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. See Specifying Custom Connectivities for more information.Data Types:
double
| logical