[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] SDC Morphology Toolbox V1.1 15Jan02

mmframe - Create a frame image.


Synopsis
y = mmframe( f, WT, HT, DT, k1, k2 )
Input
f: Gray-scale (uint8 or uint16) or binary image (logical uint8).
WT: Positive integer ( width thickness). Default: 1.
HT: Positive integer ( height thickness). Default: 1.
DT: Positive integer ( depth thickness). Default: 1.
k1: Non-negative integer. Frame gray-level. Default: Maximum pixel value allowed.
k2: Non-negative integer. Background gray level. Default: 0.
Output
y: Gray-scale (uint8 or uint16) or binary image (logical uint8). image of same type as f.
Description
mmframe creates an image y, with the same dimensions (W,H,D) and same pixel type of the image f, such that the value of the pixels in the image frame is k1 and the value of the other pixels is k2. The thickness of the image frame is DT.
Examples
a = uint8(ones(5,7));
b = mmframe(a)

b =
   255   255   255   255   255   255   255
   255     0     0     0     0     0   255
   255     0     0     0     0     0   255
   255     0     0     0     0     0   255
   255   255   255   255   255   255   255
c = mmframe(mmbinary(a))

c =
     1     1     1     1     1     1     1
     1     0     0     0     0     0     1
     1     0     0     0     0     0     1
     1     0     0     0     0     0     1
     1     1     1     1     1     1     1
Equation

equation

Where equation is the image frame of f, characterized by wt and ht
See Also
mmdraw - Superpose rectangles and lines on an image. Obsolete, use mmdrawv.
mmfreedom - Control automatic data type conversion.

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