In the OpenCV documentation the alpha parameter is often said to be the contrast of the image (see OpenCV: Changing the contrast and brightness of an image!). Why is that? If my understanding is right, it scales all pixels in respect to 0 instead of 128 (mid gray point) so in effect increasing alpha makes everything brighter and decreasing it (in respect to 1) makes the whole image darker.
To increase contrast without effecting brightness (making dark pixels darker and bright pixels brighter) you would have to
g(x, y) = alpha * (f(x,y) - 128) + 128
g(x,y) = alpha * f(x,y) - alpha * 128 + 128
So for changing contrast without effecting brightness in that way you always have to set:
beta = - alpha * 128 + 128
where g(x,y) is the new value and f(x,y) the old value for the pixel at x,y.
Is my understanding of the convertTo function correct?