Brightness and contrast modeling
The brightness of an object is the perceived luminance or intensity and depends on the luminance of the environment. Two objects in different environments could have the same luminance but different brightness. The reason is that the human visual perception is sensitive to luminance contrast rather than absolute luminance. Contrast is the difference in luminance and/or color that makes an object distinguishable compared to other objects within the same field of view. The maximum contrast of an image is known as the contrast ratio or dynamic range.
It is possible to modify the brightness and contrast of an image by means of point-wise operations. Point operations map a given gray pixel value into a different gray level according to a transform previously defined. In OpenCV, point operations may be performed with the function void Mat::convertTo(OutputArray m, int rtype, double alpha=1, double beta=0)
. The convertTo
function converts an image array to another...