You are here : matlabImage Processingimimposemin

imimposemin() - Image Processing

I2 = imimposemin(I,BW) modifies
the intensity image I using morphological reconstruction
so it only has regional minima wherever BW is nonzero. BW is
a binary image the same size as I.By default, imimposemin uses 8-connected
neighborhoods for 2-D images and 26-connected neighborhoods for 3-D
images. For higher dimensions, imimposemin uses conndef(ndims(I),'minimum').I2 = imimposemin(I,BW,conn)  
specifies the connectivity, where 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 also 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

I2 = imimposemin(I,BW)I2 = imimposemin(I,BW,conn)


Example

mask = imread('glass.png');
imshow(mask)


Output / Return Value


Limitations


Alternatives / See Also


Reference