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

mmbinary - Convert a gray-scale image into a binary image.


Synopsis
y = mmbinary( f, k1 )
Input
f: Gray-scale (uint8 or uint16) image.
k1: Non-negative integer. Threshold value. Default: 1.
Output
y: Binary image (logical uint8).
Description
mmbinary converts a gray-scale image f into a binary image y by a threshold rule. A pixel in y has the value 1 if and only if the corresponding pixel in f has a value greater or equal k1.
Examples
a = [0 1 2 3 4];
b=mmbinary(a)
Warning: Converting image from double to uint16.
b =
     0     1     1     1     1
a=mmreadgray('mm3.tif');
b=mmbinary(a,82);
mmshow(a);
mmshow(b);
image
(a)
image
(b)
Equation

equation

See Also
mmgray - Convert a binary image into a gray-scale image.
mmisbinary - Check for binary image. Obsolete, use mmis.
mmthreshad - Threshold (adaptive).

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