0

I am working on a project, where the user can specify a gamma function on a image, for example:

y=(pow(10,(1023*x-681)/444)-.0408)/(1-.0408)) 

The image is then encoded with this gamma curve, and then my code must be able to return this image back to its original (linear) version:

(y=x)

My question is how I can decode a gamma corrected image back to a linear version if i know the encoding function?

Malu05
  • 119
  • 2
  • 3
  • 10

1 Answers1

1

Use inverse function

x = (444 * (log ((1-.0408) * y + .0408) / log 10) + 681) / 1023 
Anton Malyshev
  • 8,686
  • 2
  • 27
  • 45