Function File:  imimposemin (im, bw)
Function File:  imimposemin (im, bw, conn)

Modify the input impage im to only have regional minima at the marker positions given by the nonzero pixels of bw.

This function returns a grayscale image that is similar to im but only has regional minima at pixel positions where the marker image bw is nonzero.

The input image im needs to be a real and nonsparse numeric array (of any dimension). And the marker image bw needs to be a real or logical nonsparse array of identical size. (The values in bw will first be converted to logical values.)

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).

See also: imextendedmin, imhmin, imregionalmin, imreconstruct.

Package: image