Image Processing Toolbox | ![]() ![]() |
Syntax
Description
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),'mimimum')
.
I2 = imimposemin(I,H,CONN)
specifies the connectivity, where CONN
may have any of the following scalar values.
Connectivity may 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.
Class Support
I
can be of any nonsparse numeric class and any dimension. BW
must be a nonsparse numeric array with the same size as I
. I2
has the same size and class as I
.
Example
Modify the image in bonemarr.tif
so that is only has regional minima at one location.
imregionalmin
to find all regional minima in the image.
Algorithm
imimposemin
uses a technique based on morphological reconstruction.
See Also
conndef
, imreconstruct
, imregionalmin
![]() | imhmin | imlincomb | ![]() |