| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
B = mmimg2se( fd, FLAT, f ) fd: Binary image (logical uint8). FLAT: String. 'FLAT' or 'NON-FLAT'. Default: "FLAT".f: Gray-scale (uint8 or uint16) or binary image (logical uint8). Default: No parameter.B: Structuring element. mmimg2se creates a flat structuring element B from the binary image fd or creates a non-flat structuring element b from the binary image fd and the gray-scale image f. fd represents the domain of b and f represents the image of the points in fd.mmimg2se to create structuring elements. In the example below, the elementary cross is created.
a = mmimg2se([0 1 0;1 1 1;0 1 0]); Warning: Converting image from double to binary uint8. mmseshow(a) ans = 0 1 0 1 1 1 0 1 0 |
In this next example, the image sizes are even. Note the origin of the structuring element.
b = uint8([0 1 1 1; 1 1 1 0])
b =
0 1 1 1
1 1 1 0
b1 = mmimg2se(b);
Warning: Converting image from uint8 to binary uint8.
mmseshow(b1)
ans =
0 0 0 0 0
0 0 1 1 1
0 1 1 1 0
|
c = [0 1 0;1 1 1;0 1 0]; d = [0 0 0;0 1 0;0 0 0]; e = mmimg2se(c,'NON-FLAT',d); Warning: Converting image from double to binary uint8. Warning: Converting image from double to uint16. mmseshow(e) ans = 0 1 0 1 2 1 0 1 0 |


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