BW = imregionalmax(I)
BW = imregionalmax(I, conn)
| Parameter | Description |
|---|---|
| I | Input finite real 2-D image. |
| conn | Connectivity, either 4, 8, or an equivalent 3-by-3 matrix. |
| Parameter | Description |
|---|---|
| BW | Logical mask whose true pixels belong to regional maxima. |
imregionalmax marks connected flat zones that have no higher-valued neighbor under the selected connectivity.
I=[1 1 1;1 3 3;1 3 3];
BW=imregionalmax(I);
figure; subplot(1,2,1); imagesc(I); title('Image');
subplot(1,2,2); imagesc(BW); title('Regional maxima');
| Version | Description |
|---|---|
| 2.0.0 | initial version |