next up previous contents index
Next: ccontrast Up: Reference Previous: bicontrast   Contents   Index

binarize

$ \bigcirc$Name


binarize Binarize an image




$ \bigcirc$Command Synopsis


binarize [-t t] [-i] input output



-t t : threshold value (default:128.0)

-i : apply video inverse to output

input : input Fimage

output : output Cimage (grey levels 0 and 255 only)




$ \bigcirc$Function Summary


void binarize (in , out , t , i )

Fimage in ;

Cimage out ;

float *t ;

char *i ;




$ \bigcirc$Description


This modules thresholds a Fimage u at a value t (default 128.0), and produces a Cimage v such that

v(x, y) = $\displaystyle \left\{\vphantom{ \begin{array}{l}
255 \mbox{ if } u(x,y) > t,\\
0 \mbox{ if } u(x,y) \leq t.
\end{array}}\right.$$\displaystyle \begin{array}{l}
255 \mbox{ if } u(x,y) > t,\\
0 \mbox{ if } u(x,y) \leq t.
\end{array}$

If the -i option is selected, the video inverse v $ \mapsto$ 255 - v is then applied.




$ \bigcirc$Version 1.02


Last Modification date : Thu Nov 29 20:23:56 2001


$ \bigcirc$Author


Lionel Moisan






next up previous contents index
Next: ccontrast Up: Reference Previous: bicontrast   Contents   Index
mw 2004-05-05