[mmse2hmt] [Up] [mminfcanon] Sup-generating And Inf-generating

mmthreshad
Threshold (adaptive)

Synopsis

y = mmthreshad ( f , f1 , f2 = Null )

Input

f Image Gray-scale (uint8 or uint16) image

f1 Image Gray-scale (uint8 or uint16) image

lower value

f2 Image Gray-scale (uint8 or uint16) image

upper value

Default: Null

Output

y Image Binary image

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))
Warning: upcasting image from scalar to uint8
Warning: upcasting image from scalar to uint8
mmshow(b)
c = mmthreshad(a,238)
Warning: upcasting image from scalar to uint8
mmshow(c)
a b
c

Equation

See also

mmfreedom Control automatic data type conversion.
mmgray Convert a binary image into a gray-scale image.
mmbinary Convert a gray-scale image into a binary image
mmcmp Compare two images pixelwisely.
[mmse2hmt] [Up] [mminfcanon]