title: Input Power value for CIGammaAdjust filter in Core Image
body: <p>I want to perform auto gamma correction using the Core Image filter CIGammaAdjust. CIGammaAdjust requires "inputPower" value to be set as in the following code:</p>
  
  <pre><code>CIFilter* gammaFilter = [CIFilter filterWithName:@"CIGammaAdjust"];
  [gammaFilter setValue:resultImage forKey:@"inputImage"];
  [gammaFilter setValue:???  forKey: @"inputPower"];
  resultImage = [gammaFilter valueForKey: @"outputImage"];
  </code></pre>
  
  <p>The question is, how should I calculate the value for Input Power? I have the gamma value of the image calculated. How do I convert the Image gamma value to input power? I tried using just the reciprocal of gamma value but that doesn't seem to give the right result.</p>