| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
y = mmopentransf( f, type, n ) f: Binary image (logical uint8). type: String. Disk family: 'OCTAGON', 'CHESSBOARD', 'CITY-BLOCK', 'LINEAR-V', LINEAR-H'. Default: 'OCTAGON'.n: Maximum disk radius. Default: 65535.y: Gray-scale (uint8 or uint16) image.
f = logical(uint8([...
0 0 0 0 0 0 0 0;...
0 0 1 1 1 1 0 0;...
0 0 1 1 1 1 1 0;...
0 1 0 1 1 1 0 0;...
1 1 0 0 0 0 0 0]));
mmopentransf( f, 'city-block')
processing r= 0
processing r= 1
processing r= 2
ans =
0 0 0 0 0 0 0 0
0 0 1 2 2 2 0 0
0 0 2 2 2 2 2 0
0 1 0 2 2 2 0 0
1 1 0 0 0 0 0 0
mmopentransf( f, 'chessboard')
processing r= 0
processing r= 1
processing r= 2
ans =
0 0 0 0 0 0 0 0
0 0 1 2 2 2 0 0
0 0 1 2 2 2 1 0
0 1 0 2 2 2 0 0
1 1 0 0 0 0 0 0
mmopentransf( f, 'linear-h')
processing r= 0
processing r= 1
processing r= 2
processing r= 3
ans =
0 0 0 0 0 0 0 0
0 0 2 2 2 2 0 0
0 0 3 3 3 3 3 0
0 1 0 2 2 2 0 0
2 2 0 0 0 0 0 0
mmopentransf( f, 'linear-v')
processing r= 0
processing r= 1
processing r= 2
ans =
0 0 0 0 0 0 0 0
0 0 1 2 2 2 0 0
0 0 1 2 2 2 1 0
0 2 0 2 2 2 0 0
1 2 0 0 0 0 0 0
|
f=imread('numbers.tif');
mmshow(f);
g=mmopentransf(f,'OCTAGON');
processing r= 0
processing r= 1
processing r= 2
processing r= 3
processing r= 4
mmshow(g);
|
b=mmsedisk(3,'2D','OCTAGON'); g1=mmopen(f,b); mmshow(g1); g2=mmcmp(g,'>',3); Warning: Converting image from scalar to uint16. mmis(g1,'==',g2) ans = 1
|



| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] |
|
| Copyright (c) 1998-2002 by SDC Information Systems | ||