J = imhmax(I, h)
J = imhmax(I, h, conn)
| 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. |
| Parameter | Description |
|---|---|
| J | Image after h-maxima suppression. |
imhmax suppresses maxima shallower than h. It is useful for foreground marker extraction before segmentation.
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');
| Version | Description |
|---|---|
| 2.0.0 | initial version |