| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
y = mmasfrec( f, SEQ, b, bc, n ) f: Gray-scale (uint8 or uint16) or binary image (logical uint8). SEQ: String. 'OC', 'CO'. Default: "OC".b: Structuring element. Default: Elementary cross (mmsecross).bc: 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 by reconstruction and open by reconstruction alternating sequential filter characterized by the structuring element b. The structure element bc is used in the reconstruction. The sequence of opening and closing is controlled by the parameter SEQ. 'OC' performs opening after closing, and 'CO' performs closing after opening.f=mmreadgray('fabric.tif'); g=mmasfrec(f,'oc',mmsecross,mmsecross,3); mmshow(f); mmshow(g);
|


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