[mmgray] [Up] [mmdrawv] Image Creation

mmframe
Create a frame image.

Synopsis

function y = mmframe ( f , WT , HT , DT , k1 , k2 )

Input

f Image Unsigned gray-scale (uint8 or uint16), signed (int32) or binary image
WT Double

Default: 1

Positive integer ( width thickness).

HT Double

Default: 1

Positive integer ( height thickness).

DT Double

Default: 0

Positive integer ( depth thickness).

k1 Double Non-negative integer.

Default: NULL

Frame gray-level.

k2 Double Non-negative integer.

Default: NULL

Background gray level.

Output

y Image

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

Where is the image frame of f, characterized by wt and ht

See also

mmfreedom Control automatic data type conversion.
mmdraw Superpose rectangles and lines on an image. Obsolete, use mmdrawv.
mmlimits Get the possible minimum and maximum of an image.
[mmgray] [Up] [mmdrawv]