Image Processing Toolbox User's Guide Previous page   Next Page
imreconstruct

Morphological reconstruction

Syntax

Description

IM = imreconstruct(MARKER,MASK) performs morphological reconstruction of the image MARKER under the image MASK. MARKER and MASK can be two intensity images or two binary images with the same size. The returned image IM is an intensity or binary image, respectively. MARKER must be the same size as MASK, and its elements must be less than or equal to the corresponding elements of MASK.

By default, imreconstruct uses 8-connected neighborhoods for 2-D images and 26-connected neighborhoods for 3-D images. For higher dimensions, imreconstruct uses conndef(ndims(I),'maximal').

IM = imreconstruct(MARKER,MASK,CONN) performs morphological reconstruction with the specified connectivity. CONN can have any of the following scalar values.

Value
Meaning
Two-dimensional connectivities
4
4-connected neighborhood
8
8-connected neighborhood
Three-dimensional connectivities
6
6-connected neighborhood
18
18-connected neighborhood
26
26-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.

Morphological reconstruction is the algorithmic basis for several other Image Processing Toolbox functions, including imclearborder, imextendedmax, imextendedmin, imfill, imhmax, imhmin, and imimposemin.

Class Support

MARKER and MASK must be nonsparse numeric or logical arrays with the same class and any dimension. IM is of the same class as MARKER and MASK.

Algorithm

imreconstruct uses the fast hybrid grayscale reconstruction algorithm described in [1].

See Also

imclearborder, imextendedmax, imextendedmin, imfill, imhmax, imhmin, imimposemin

Reference

[1]  Vincent, L., "Morphological Grayscale Reconstruction in Image Analysis: Applications and Efficient Algorithms," IEEE Transactions on Image Processing, Vol. 2, No. 2, April, 1993, pp. 176-201.


Previous page  imread imregionalmax Next page

© 1994-2005 The MathWorks, Inc.