| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
y = mmregmax( f, Bc ) f: Gray-scale (uint8 or uint16) image. Bc: Structuring element. (connectivity). Default: Elementary cross (mmsecross).y: Binary image (logical uint8). mmregmax creates a binary image y by computing the regional maxima of f, according to the connectivity defined by the structuring element Bc.
a = uint8([...
5 10 10 10 10 10 10;...
5 9 6 18 6 5 10;...
5 9 6 18 6 8 7;...
5 9 9 15 9 7 10;...
5 9 9 15 12 10 10;...
5 5 5 5 10 10 10]);
b = mmregmax(a)
b =
0 0 0 0 0 0 0
0 0 0 1 0 0 0
0 0 0 1 0 1 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
c = mmregmax(a,mmsebox)
c =
0 0 0 0 0 0 0
0 0 0 1 0 0 0
0 0 0 1 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
|
f=mmreadgray('astablet.tif'); y1=mmregmax(f); f2=mmopen(f,mmsedisk(20)); y2=mmregmax(f2); mmshow(f); mmshow(y1); mmshow(f2); mmshow(y2);
|

function y=mmregmax_equ( f, bc) if (isa(f,'uint8')) k = 255; else k = 65535; fplus = mmaddm(f,1); g = mmsubm(fplus,mminfrec(f,fplus,bc)); y = mmunion(mmthreshad(g,1),mmthreshad(f,k));
| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] |
|
| Copyright (c) 1998-2002 by SDC Information Systems | ||