Thursday 17 March 2016

calculations - How to scale between two white balance settings for perceptually equal increments?


If I have two white balance settings (say, one for direct noon sunlight, and one for full shade) and I want to create a series of interpolated settings that span between the two, what would be the correct method to derive the red and blue channel multiplier values between the existing ones that would produce perceptually equal steps (maintaining the green channel at unity gain, as most white balancing methods seem to do)?



Answer



Interpolate the R and B numbers logarithmically. We perceive light intensity that way, not linearly. For example, the same scene taken at a sequence of decreasing f-stops with everything else held constant yields a sequence of pictures that look successively lighter, with each step feeling roughly constant. However, the actual amount of light will go in a power of 2 sequence.


To interpolate a light level from A to B, you want to find a ratio, as opposed to a increment, that gets you there in the number of steps you want. In regular linear interpolation, if you wanted to go from A to B in 4 steps, you'd add (B-A)/4 each step. In logarithmic interpolation you want to multiply by some value each step. In this example, that multiple would be (B/A)1/4, which is the fourth root of B/A. In general, the mutiply factor each step is (B/A)1/steps.


For example, if you want to go from 5 to 39 in 4 steps, then each step must be (39/5)1/4 = 1.6712. The sequence would be:




5.000
8.356
13.964
23.337
39.000

Perform this interpolation on each of the red and blue values separately, assuming the green values are all normalized to 1 as you stated in your question.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...