| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
y = mmasf( f, SEQ, b, n ) f: Gray-scale (uint8 or uint16) or binary image (logical uint8). SEQ: String. 'OC', 'CO', 'OCO', 'COC'. Default: "OC".b: Structuring element. Default: Elementary cross (mmsecross).n: Non-negative integer. (number of iterations). Default: 1.y: Gray-scale (uint8 or uint16) or binary image (logical uint8). mmasf creates the image y by filtering the image f by n iterations of the close and open alternating sequential filter characterized by the structuring element b. The sequence of opening and closing is controlled by the parameter SEQ. 'OC' performs opening after closing, 'CO' performs closing after opening, 'OCO' performs opening after closing after opening, and 'COC' performs closing after opening after closing.f=mmreadgray('gear.tif'); g=mmasf(f,'oc',mmsecross,2); mmshow(f); mmshow(g);
|
f=mmreadgray('fabric.tif'); g=mmasf(f,'oc',mmsecross,3); mmshow(f); mmshow(g);
|




function y=mmasf_equ( f, SEQ, b, n )
switch SEQ
case 'OC',
y = f;
for i=1:n
nb = mmsesum(b,i);
y = mmclose(y,nb);
y = mmopen(y,nb);
end;
case 'CO',
y = f;
for i=1:n
nb = mmsesum(b,i);
y = mmopen(y,nb);
y = mmclose(y,nb);
end;
case 'OCO',
y = f;
for i=1:n
nb = mmsesum(b,i);
y = mmopen(y,nb);
y = mmclose(y,nb);
y = mmopen(y,nb);
end;
case 'COC',
y = f;
for i=1:n
nb = mmsesum(b,i);
y = mmclose(y,nb);
y = mmopen(y,nb);
y = mmclose(y,nb);
end;
end; | [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] |
|
| Copyright (c) 1998-2002 by SDC Information Systems | ||