J = imhmin(I, h)
J = imhmin(I, h, conn)
| 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. |
| Parameter | Description |
|---|---|
| J | Image after h-minima suppression. |
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.
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');
| Version | Description |
|---|---|
| 2.0.0 | initial version |