Function File:  imhmin (im, h)
Function File:  imhmin (im, h, conn)

Caculate the morphological h-minimum transform of an image im.

This function removes all regional minima in the grayscale image im whose depth is less or equal to the given threshold level h, and it increases the depth of the remaining regional minima by the value of h. (A "regional minimum" is defined as a connected component of pixels with an equal pixel value that is less than the value of all its neighboring pixels. And the "depth" of a regional minimum can be thought of as minimum pixel value difference between the regional minimum and its neighboring maxima.)

The input image im needs to be a real and nonsparse numeric array (of any dimension), and the height parameter h a non-negative scalar number.

The definition of "neighborhood" for this morphological operation can be set with the connectivity parameter conn, which defaults to 8 for 2D images, to 26 for 3D images and to conn(ndims(n), "maximal") in general. conn can be given as scalar value or as a boolean matrix (see conndef for details).

The output is a transformed grayscale image of same type and shape as the input image im.

See also: imhmax, imregionalmin, imextendedmin, imreconstruct.

Package: image