| [Up] [mmfreedom] | Data Type Conversion |
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.
def mmbinary(f, k1=1):
from Numeric import array
if type(f) is not array: f = array(f)
y = array(f>=k1).astype('1')
return y
| mmthreshad | Threshold (adaptive) |
| mmisbinary | Check for binary image |
| mmgray | Convert a binary image into a gray-scale image. |
| [Up] [mmfreedom] | |
| Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |