Average auto gain filter

Description

Filter This filter automatically adjust the image exposure, by applying a linear gain. The gain value is calculated to provide 18% average luminance over the image. An additional parameter allows adjusting the gain in EV stops.

If the image contains very bright values such as a bright sky or sun reflections, this filter will likely underexpose the image. This problem is similar to back-lighting scenes which are often not well handled by digital or film cameras. A more advanced filter such as histogram auto gain might work better in these cases.

This filter works both in XYZ and RGB color spaces. For RGB color spaces, it assumes sRGB color space as defined in IEC 61966-2-1:1999 for computing brightness, using the formula Y=0.2126R+0.7152G+0.0722B

Input and output

  • Input channels must contain either X,Y,Z or R,G,B channels

  • Output channels are the same as input.

  • Does not alter the buffer dimensions

  • Preserves denoising meta-data

Parameters

name

type

description

evadjust

real

Exposure adjustment in EV stops, similar to exposure correction on cameras. From -30 to 30

Ocean XML 3.0 example

<filter type="averageautogain" name="#" evadjust="1.5"/>