[mmshow] [Up] [mmhbasin] Obsolete

mmdraw
Superpose rectangles and lines on an image. Obsolete, use mmdrawv.

Synopsis

function y = mmdraw ( f , RECTLIST , k1 )

Input

f Image Gray-scale (uint8 or uint16) or binary image

uint8 or logical uint8.

RECTLIST String

' R1 C1 R2 C2' ( extremities).

k1 Double Non-negative integer.

Default: NULL

Output

y Image

y has the same type of f.

Description

mmdraw creates the image y by a superposition of rectangles and lines of gray-level k1 on the image f. Each rectangle or line is defined by two pairs of points (Row,Column): (R1,C1) and (R2,C2). For a rectangle, (R1,C1) and (R2,C2) represent, respectively, its left low and right upper corner, while for a line, they represent their extremities. The syntax of representation of a rectangle, a filled rectangle, and a line are, respectively, RECT: R1,C1,R2,C2, FRECT:R1,C1,R2,C2, and LINE:R1,C1,R2,C2. A sequence of definitions of lines and rectangles is closed by the command END. Lines and rectangles definitions are delimited by colon (:).

Examples

Draws a white rectangle and line on image f.

a=mmreadgray('n2538.tif');
b=mmdraw(a,'RECT:96,25,124,45:LINE:93,3,4,124:END');
mmshow(a);
mmshow(b);
a b

See also

mmfreedom Control automatic data type conversion.
mmframe Create a frame image.
mmtext Create a binary image of a text.
[mmshow] [Up] [mmhbasin]