The \(\alpha\) gain can be used to diminue this effect but due to the saturation, we will lose some details in the original bright regions. It can occur that playing with the \(\beta\) bias will improve the brightness but in the same time the image will appear with a slight veil as the contrast will be reduced. The brightness tool should be identical to the \(\beta\) bias parameters but the contrast tool seems to differ to the \(\alpha\) gain where the output range seems to be centered with Gimp (as you can notice in the previous histogram). Note that these histograms have been obtained using the Brightness-Contrast tool in the Gimp software. In light gray, histogram of the original image, in dark gray when contrast < 0 in Gimp Where \(i\) and \(j\) indicates that the pixel is located in the i-th row and j-th column. Then, more conveniently we can write the expression as:
You can think of \(f(x)\) as the source image pixels and \(g(x)\) as the output image pixels.
Prev Tutorial: Adding (blending) two images using OpenCV