next up previous contents index
Next: ccontrast_local Up: Reference Previous: binarize   Contents   Index

ccontrast

$ \bigcirc$Name


ccontrast Contrast improvment by histogram adjusting




$ \bigcirc$Command Synopsis


ccontrast [-g g] input output



-g g : gamma factor (visual correction)

input : source image

output : processed image




$ \bigcirc$Function Summary


void ccontrast (in , out , g )

Cimage in ;

Cimage out ;

float *g ;




$ \bigcirc$Description


This module adjusts the histogram of a cimage in order to improve contrast, simply by changing the cimage u into f (u). The determination of the f function is the following :

Let H(y) = measure{x;u(x) $ \leq$ y} the repartition function of the cimage u, which derivative H'(y) is nothing but the histogram of u. The f function is chosen in order to make H as close to identity as possible, which correspond to a uniform histogram, and produces the best contrast possible this way. However, because the human visual system is not equally sensitive to grey-level contrasts (we are more accurate around white than black), or simply because the screen and the camera have not a linear response to intensity, it is sometimes interesting to use a so-called ``gamma correction''. This correction applies after the histogram equalization, and changes image f (u) into f (u)$\scriptstyle {\frac{}{}}$1$ \gamma$, where the parameter $ \gamma$ > 0 is taken according to the -g option. This way, a $ \gamma$ > 1 improves the contrast around the black levels, whereas a 0 < $ \gamma$ < 1 improves the contrast aroud the white ones.




$ \bigcirc$Version 1.0


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


$ \bigcirc$Author


Lionel Moisan






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