imhmin
Suppress shallow minima using the h-minima transform.
📝Syntax
J = imhmin(I, h)
J = imhmin(I, h, conn)
📥Input Arguments
Parameter Description
I Input finite real 2-D image.
h Nonnegative finite height used to suppress shallow minima.
conn Connectivity, either 4, 8, or an equivalent 3-by-3 matrix.
📤Output Arguments
Parameter Description
J Image after h-minima suppression.
📄Description

imhmin computes the h-minima transform by grayscale reconstruction by erosion of I+h under I. It is useful for suppressing shallow minima before marker extraction or watershed segmentation.

💡Examples
Suppress a shallow minimum
I=[5 5 5;5 2 5;5 5 5];
J=imhmin(I,2);
figure; subplot(1,2,1); imagesc(I); title('Input');
subplot(1,2,2); imagesc(J); title('h-minima');
Example illustration
🔗See Also
imextendedminimregionalminwatershed
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub