| Image Processing Toolbox User's Guide | ![]() |
Syntax
Description
I2 = imhmin(I,h) suppresses all minima in the intensity image I whose depth is less than h, where h is a scalar.
Regional minima are connected components of pixels with a constant intensity value, and whose external boundary pixels all have a higher value.
By default, imhmin uses 8-connected neighborhoods for 2-D images, and 26-connected neighborhoods for 3-D images. For higher dimensions, imhmin uses conndef(ndims(I),'maximal').
I2 = imhmin(I,h,CONN) computes the H-minima transform, where CONN specifies the connectivity. CONN can have any of the following scalar values.
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.
Class Support
I can be of any nonsparse numeric class and any dimension. I2 has the same size and class as I.
Example
Create a sample image with two regional minima.
a = 10*ones(10,10); a(2:4,2:4) = 7; a(6:8,6:8) = 2 a = 10 10 10 10 10 10 10 10 10 10 10 7 7 7 10 10 10 10 10 10 10 7 7 7 10 10 10 10 10 10 10 7 7 7 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 2 2 2 10 10 10 10 10 10 10 2 2 2 10 10 10 10 10 10 10 2 2 2 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
Suppress all minima below a specified value. Note how the region with pixel valued 7 disappears in the transformed image.
b = imhmin(a,4) b = 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 6 6 6 10 10 10 10 10 10 10 6 6 6 10 10 10 10 10 10 10 6 6 6 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
See Also
conndef, imhmax, imreconstruct
Reference
[1] Soille, P., Morphological Image Analysis: Principles and Applications, Springer-Verlag, 1999, pp. 170-171.
| imhmax | imimposemin | ![]() |
© 1994-2005 The MathWorks, Inc.