Objective
In the previous article, we explained the convolution operation and smoothing (i.e. fuzzy) processing in the image processing, this article we carry on the brightness and the contrast change.
Actually, what is brightness?
Brightness is more bright eye slightly ...
In fact, for RGBA color space, brightening is equal to R, G, b three channels at the same time increase, then the dimming is equal to the reduction at the same time.
This is better understood because the darkest black is RGB (0,0,0), and the brightest white is RGB (255,255,255). So lighten should be RGB each channel to increase.
So, what's the contrast?
Contrast, in fact, is the color of the poor.
So for the RGBA color space, the contrast is actually equal to the R, G, b three channels multiplied by a ratio, because such a similar color gap between the larger, then the reduction is at the same time divided by slightly.
For example, the original RGB (23,44,55) and RGB (33,44,55) difference is only 10, but multiplied by 2, became RGB (46,88,110) and RGB (66,88,110), the difference became 20, that is, "color difference" has become larger.
Linear model
NEWRGB = contrast * RGB + brightness
The linear model satisfies the above formula, wherein contrast represents the contrast coefficient, and the brightness represents the brightness coefficient.
Linear model implementation is relatively simple, but it is easy to call out the whole white or black picture, for ordinary users contrast, brightness choose how much better also more difficult to determine.
So instead of using linear models in Photoshop, it's not a linear model.