| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
y = mmskelm( f, B, option ) f: Binary image (logical uint8). B: Structuring element. Default: Elementary cross (mmsecross).option: String. Choose one of: binary: output a binary image (medial axis); value: output a grayscale image with values of the radius of the disk to reconstruct the original image (medial axis transform). Default: "binary".y: Gray-scale (uint8 or uint16) or binary image (logical uint8). mmskelm creates the image y by computing the morphological skeleton by B of the image f, when option is BINARY. In this case, the pixels of value 1 in y are center of maximal balls (generated from B) included in f. This is also called Medial Axis. If option is VALUE, the non zeros pixels in y are the radius plus 1 of the maximal balls. This is called Medial Axis Transform or valued morphological skeleton.a=mmneg(mmframe(mmbinary(ones(7,9)))) Warning: Converting image from double to uint16. a = 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 mmskelm(a) ans = 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 mmskelm(a,mmsebox) ans = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 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 0 0 0 0 0 0 |
a=mmreadgray('pcbholes.tif'); b=mmskelm(a); mmshow(a); mmshow(b);
|
c=mmskelm(a,mmsecross,'value'); mmshow(c);
|

function y=mmskelm_equ(f, B)
y = mmbinary(zeros(size(f)));
for i=0:length(f)
nb = mmsesum(B,i);
f1 = mmero(f,nb);
f2 = mmopenth(f1,B);
y = mmunion(y,f2);
end; | [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] |
|
| Copyright (c) 1998-2002 by SDC Information Systems | ||