|m||output matrix; if it does not have a proper size or type before the operation, it is reallocated|
|rtype||desired output matrix type or, rather, the depth since the number of channels are the same as the input has; if rtype is negative, the output matrix will have the same type as the input|
|alpha||optional scale factor. This changes the contrast of an image. Values below 1 decrease the contrast and above one increases the contrast|
|beta||optional delta added to the scaled values. Positive values increases the brightness and negative values decreases the brightnes|
Contrast is the difference in luminance or colour that makes an object (or its representation in an image or display) distinguishable. The higher the difference between a pixel and its neighbors the higher the contrast is in that area.
In other words, brightness is the perception elicited by the luminance of a visual target. In terms of pixels, the higher the value of a pixel is the brighter that pixel is.
Contrast and Brightness adjustments:
f(x) as the source image pixels and
g(x) as the output image pixels.
j indicates that the pixel is located in the i-th row and j-th column.
α > 0 and
β are often called the gain and bias parameters; sometimes these parameters are said to control contrast and brightness respectively.
Opencv has a function called convertTo() which can apply these two operations.
Sources: http://docs.opencv.org/trunk/d3/d63/classcv_1_1Mat.html#adf88c60c5b4980e05bb556080916978b http://opencv-srf.blogspot.ca/2013/07/change-contrast-of-image-or-video.html http://opencv-srf.blogspot.ca/2013/07/change-brightness.html