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

mmthreshad - Threshold (adaptive).


Synopsis
y = mmthreshad( f, f1, f2 )
Input
f: Gray-scale (uint8 or uint16) image.
f1: Gray-scale (uint8 or uint16) image. Or constant.
f2: Gray-scale (uint8 or uint16) image. Or constant. Default: Maximum pixel value allowed.
 
Obs: f, f1, f2 must have the same data type.
Output
y: Binary image (logical uint8).
Description
mmthreshad creates the image y as the threshold of the image f by the images f1 and f2. A pixel in y has the value 1 when the value of the corresponding pixel in f is between the values of the corresponding pixels in f1 and f2.
Examples
a = mmreadgray('keyb.tif');
mmshow(a);
b = mmthreshad(a,uint8(10), uint8(50));
mmshow(b);
c = mmthreshad(a,238);
Warning: Converting image from scalar to uint8.
mmshow(c); 
image
(a)
image
(b)
image
(c)
Equation

equation

Algorithm
function y = mmthreshad_equ( f, f1, f2 )
  y = (f1 <= f) & (f <= f2);
See Also
mmbinary - Convert a gray-scale image into a binary image.
mmcmp - Compare two images pixelwisely.
mmfreedom - Control automatic data type conversion.
mmgray - Convert a binary image into a gray-scale image.

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