| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
y = mmblob( fr, measurement, option ) fr: Gray-scale (uint8 or uint16) image. Labeled image. measurement: String. Choice from 'AREA', 'CENTROID', or 'BOUNDINGBOX'. option: String. Output format: 'image': results as a binary image (logical uint8); 'data': results a column vector of measurements (double). Default: "image".y: Gray-scale (uint8 or uint16) or binary image (logical uint8). fr. The measurements are: area, centroid, or bounding rectangle. The parameter option controls the output format: 'IMAGE': the result is an image; 'DATA': the result is a double column vector with the measurement for each blob. The region with label zero is not measured as it is normally the background. The measurement of region with label 1 appears at the first row of the output.
fr=uint8([1 1 1 0 0 0; 1 1 1 0 0 2; 1 1 1 0 2 2])
fr =
1 1 1 0 0 0
1 1 1 0 0 2
1 1 1 0 2 2
f_area=mmblob(fr,'area')
f_area =
9 9 9 0 0 0
9 9 9 0 0 3
9 9 9 0 3 3
f_cent=mmblob(fr,'centroid')
f_cent =
0 0 0 0 0 0
0 1 0 0 1 0
0 0 0 0 0 0
f_bb=mmblob(fr,'boundingbox')
f_bb =
1 1 1 0 0 0
1 0 1 0 1 1
1 1 1 0 1 1
d_area=mmblob(fr,'area','data')
d_area =
9
3
d_cent=mmblob(fr,'centroid','data')
d_cent =
2 2
2 5
d_bb=mmblob(fr,'boundingbox','data')
d_bb =
1 1 3 3
2 5 3 6
|
f=mmreadgray('blob3.tif'); fr=mmlabel(f); g=mmblob(fr,'area'); mmshow(f); mmshow(g);
|
f=mmreadgray('blob3.tif'); fr=mmlabel(f); centr=mmblob(fr,'centroid'); mmshow(f,mmdil(centr));
|
f=mmreadgray('blob3.tif'); fr=mmlabel(f); box=mmblob(fr,'boundingbox'); mmshow(f,box);
|
| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] |
|
| Copyright (c) 1998-2002 by SDC Information Systems | ||