The Naked Scientists

The Naked Scientists Forum

Author Topic: What is the difference between gamma, brightness and contrast?  (Read 8737 times)

Offline latebind

  • Sr. Member
  • ****
  • Posts: 248
  • Hello World
    • View Profile
They all seem to make the screen lighter and darker in different ways, but what do they actually do?


 

Offline LeeE

  • Neilep Level Member
  • ******
  • Posts: 3382
    • View Profile
    • Spatial
Have a look at this pic from wikipedia:

http://en.wikipedia.org/wiki/File:Gamma06_600.png

This shows how the curve is changed by altering the gamma.  When you alter the brightness you raise the entire curve up along the y-axis whilst maintaining the same slope, and when you increase the contrast you tilt the curve anti-clockwise and make it steeper.

Note that changing the brightness or contrast means that the ends of the curve are flattened and you lose information at the extremes.
 

Offline latebind

  • Sr. Member
  • ****
  • Posts: 248
  • Hello World
    • View Profile
Have a look at this pic from wikipedia:

http://en.wikipedia.org/wiki/File:Gamma06_600.png

This shows how the curve is changed by altering the gamma.  When you alter the brightness you raise the entire curve up along the y-axis whilst maintaining the same slope, and when you increase the contrast you tilt the curve anti-clockwise and make it steeper.

Note that changing the brightness or contrast means that the ends of the curve are flattened and you lose information at the extremes.

LOL :) Thanks for that. Do you have an english version :)
 

Offline LeeE

  • Neilep Level Member
  • ******
  • Posts: 3382
    • View Profile
    • Spatial
Lol - that was the English version; the only type in which I have any (debatable) degree of competence.

In that diagram/graph the two axis represent brightness: one axis is for the brightness of the original image and the other axis is for the displayed/altered image.

When there is no change, the line is straight, so that the brightness of the original is translated to the same value for display.

If you brighten the image by b, you simply lift the entire curve (line), so that an original brightness of x becomes x + b.  Increasing the contrast tilts the curve and makes it steeper, so that for example, original brightnesses of 0.25 and 0.75 may become 0.125 and 0.825 respectively, but this means that 0.0 and 1.0 in the altered image correspond to > 0.0 and < 1.0 respectively, so the information in these regions of the original image are lost.

Changing the brightness or contrast leaves the curve (line) straight though, whereas changing the gamma means changing the curve, so that the curve is... er... curved.  If you look at the gamma curves in that diagram you'll see that the start and end points are unchanged, so no information is lost at the extremes, but the translation between original brightness and altered brightness between the extremes is no longer linear and depends upon the degree of curve.
 

Offline latebind

  • Sr. Member
  • ****
  • Posts: 248
  • Hello World
    • View Profile
Great stuff! Thanks for that :)
 

The Naked Scientists Forum


 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums