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

imhmax suppresses maxima shallower than h. It is useful for foreground marker extraction before segmentation.

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