Gamma correction controls the overall brightness of an image. Images which are not corrected can look either bleached out or too dark. Suppose a computer monitor has 2.2
power function as an intensity to voltage response curve. This just means that if you send a message to the monitor that a certain pixel should have intensity equal to x
, it will actually display a pixel which has intensity equal to x2.2 Because the range of voltages sent to the monitor is between 0
and 1
, this means that the intensity value displayed will be less than what you wanted it to be. Such a monitor is said to have a gamma of 2.2
.
So in your case,
Corrected = 255 * (Image/255)^(1/2.2).