| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] | SDC Morphology Toolbox V1.1 15Jan02 |
y = mmdrawv( f, data, value, GEOM ) f: Gray-scale (uint8 or uint16) or binary image (logical uint8). data: Gray-scale (uint8 or uint16) or binary image (logical uint8). vector of points. Each row gives information regarding a geometrical primitive. The interpretation of this data is dependent on the parameter GEOM. value: Gray-scale (uint8 or uint16) or binary image (logical uint8). pixel gray-scale value associated to each point in parameter data. It can be a column vector of values or a single value. GEOM: String. geometrical figure. One of 'point','line', 'rect', or 'frect' for drawing points, lines, rectangles or filled rectangles respectively. y: Gray-scale (uint8 or uint16) or binary image (logical uint8). y has the same type of f.mmdrawv creates the image y by a superposition of points, rectangles and lines of gray-level k1 on the image f. The parameters for each geometrical primitive are defined by each line in the 'data' parameter. For points, they are represented by a matrix where each row gives the point's row and column, in this order. For lines, they are drawn with the same convention used by points, with a straight line connecting them in the order given by the data matrix. For rectangles and filled rectangles, each row in the data matrix gives the two points of the diagonal of the rectangle, where the points use the same row, column convention.
f=uint8(zeros(3,5));
pcoords=uint16([1 1; 1 3; 3 5]);
pvalue=uint16([1; 2; 3]);
mmdrawv(f,pcoords,pvalue,'point')
ans =
1 0 2 0 0
0 0 0 0 0
0 0 0 0 3
mmdrawv(f,pcoords,pvalue,'line')
ans =
1 1 2 0 0
0 0 0 2 0
0 0 0 0 2
rectcoords=uint16([1 1 3 4]);
mmdrawv(f,rectcoords, uint16(5), 'rect')
ans =
5 5 5 5 0
5 0 0 5 0
5 5 5 5 0
|
f=imread('blob3.tif');
pc=mmblob(mmlabel(f),'centroid','data');
lines=mmdrawv(logical(uint8(zeros(size(f)))),pc,uint8(1),'line');
mmshow(f,lines);
|
| [Top] [Up] [Prev] [Next] | [Up] [Basic Concepts] [Demonstrations] [Functions] |
|
| Copyright (c) 1998-2002 by SDC Information Systems | ||