Sorry for the delay, @anon41087856.
I am trying to understand what filmic curve does and how.
So I am trying to reproduce the calculations in excel (using the english version of the article in your web).
I believe I am having troubles with some concepts like the GrayPoint.
I had thought I knew what it was, but now I am not so sure.
I am confused, and my calculations do not have sense, so I am misunderstanding something.
Please help.
GrayPoint is define “everywhere” as the relative intensity of light that perceptually you see as a middle gray.
lets consider the shaper function alone
y= \frac{log_2(x/grey)- black_{EV}}{DR}
That implies that if you can appreciate say 12 EV ( DR= 12 ) being 0 the darkest point where you cannot distinguish any detail and 12 the lightest where you see no detail, middle gray would be 6EV, with 6EV range for shadows and 6 EV for lights (so black_{EV}=-6, white_{EV}=6)
I am assuming that the input that is coded in 12 bits (from 0 to 4096)
To calculate the input corresponding to a middle gray ouput, I take y=0,5 (a perceptual gray 6EV from the blackpoint).
if we calculate corresponding input:
x=gray \times 2^{ y \times DR+black_{EV}}
x_{gray}= 0.18 \times 2^0=0.18
we get 0.18 as expected.
If we calculate the camera value it would be X_{grey} = 4096*0.18= 737.28 \sim 737.
Lets calculate the corresponding camera value to black point (y=0)
x_{black}= grey \times 2^{black_{EV}}=0,18 \times 2^{-6} =2.8125 \: 10^{-3}
The corresponding camera value would be X_{black}= 4096 \times 2.8125\: 10^{-3}= 11.52 \sim 12
Now I will try to calculate the corresponding camera white point that I have expected to be 4096.
With this dynamic range of 12 EV, the white point is 12EV above the BP and 6EV over grey point, being y=1
x_{white}= 0.18 \times 2^{12-6}=0.18 \times 64=0.18 \times 64= 11.52
which is greater than one, if we calculate the correspoingi camera value it gives us X_{white}=47186.
Obviously I am misunderstanding something.
As equations are taken from your paper and I have revised calculations, it cannot be the calculations.
So I am misinterpreting grey point or white point.
May be grey point does not correspond to middle gray in output (y=0.5) but then, what does middle mean? Are wrong all that places that talk about it as the perceptual middel point?
Cameras do not punt middle gray in the middle of the distribution, canon has white_{EV}= 2.5 and a dynamic range of say 12 EV (so black_{EV}=-9.5}.
I had thought that was to let more room to shadows than lights.
May be it is the concept of white point as a number of EV in the output space.
I calculate the output corresponding to a camera value of 4096, I get:
X_{white}=4096 \rightarrow x_{white}= X_{white}/X{grey}= 4096 / 737.28= 5.55556
If I calculate the corresponding output value is:
y_{white}= \frac{log_2{\frac{5.5556}{0.18} +6 }}{12}= 0.91232
The pure white will be then in the 10.94 EV (just about 11 EV above black and not 12) so the DR won’t be 12 and the lights would have 4.94 EV and not six (but we made all calculations with a DR of 12 EV).
And the grey point won’t be in the middle of the perceptual output any more.
So what is the gray point and which is the corresponding perceptual output value?
I think the trick is in the definition of gray and white point.