Tuesday, June 20, 2006

TV Gamma curves

Got the following from Nick, one of my colleagues who is the lead developer on our ContentAgent machine;
Hi Phil,

Random question; but do you know anything about the maths for plotting gamma curves? I have to match the UI for gamma correction in the enclosed mock-up, but have no idea what equations are involved. Any ideas, or what web sites might help?

Cheers,
Nick

my reply;
Nick,

I started composing a very confusing reply but thought that there would be a good Wikipedia page, and indeed there is!

http://en.wikipedia.org/wiki/Gamma_correction

In a nutshell the formula is;

Vout = Vin raised to the power of the reciprocal of the gamma value (typ. 2.2 for PAL) - this works for value between zero and one and I think most algorithms apply that and then scale to 8 bits (don't forget the offset of 16) or 10 bit (don't remember the offset!).

Phil.

No comments: