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~:
\index{contrast!change}

Let $H(y)= \mathrm{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''. 
\index{gamma correction}
\index{histogram!equalization}
This correction applies after the histogram equalization, and changes image $f(u)$ into $f(u)^\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. 

