I think that this is a great idea Aurélien
With bounds, we will be able at least to eliminate norms which give results outside the bounds.
I am not sure of the following step: X \leq \left(\int_\Omega I(\lambda)^2 d\lambda \right)^{1/2} \left(\int_\Omega\bar X(\lambda)^2 d\lambda\right)^{1/2} \Rightarrow \dfrac{X^2}{\int_\Omega\bar X(\lambda)^2 d\lambda} \leq E
Squaring the both sides gives \dfrac{X^2}{\int_\Omega\bar X(\lambda)^2 d\lambda} \leq \int_\Omega I(\lambda)^2 d\lambda
But according to your text, E = \int_\Omega I(\lambda) d\lambda , not \int_\Omega I(\lambda)^2 d\lambda
Unless we have \forall \lambda, I(\lambda) \leq 1 (and I don’t know at all if this is true or not), I don’t see how you get \dfrac{X^2}{\int_\Omega\bar X(\lambda)^2 d\lambda} \leq E
Searching for an upper bound, I got another lower bound: \bar X , \bar Y, \bar Z should all be positive and should all have a maximum, respectively \bar X_{max}, \bar Y_{max}, \bar Z_{max}
I also suppose the I function only has positive values.
We have: X = \int_\Omega I(\lambda) \bar X(\lambda) d\lambda
And: \forall \lambda, \bar X(\lambda) \leq \bar X_{max}
Thus: \int_\Omega I(\lambda) \bar X(\lambda) d\lambda \leq \int_\Omega I(\lambda) \bar X_{max} d\lambda
Which gives: X \leq \bar X_{max} \times \int_\Omega I(\lambda) d\lambda
Which gives: \dfrac{X}{\bar X_{max}} \leq E
Using a similar result with Y and Z, we get: E \geq argmax \left( \dfrac{X}{\bar X_{max}} ; \dfrac{Y}{\bar Y_{max}} ; \dfrac{Z}{\bar Z_{max}} \right)
For an upper bound, we could consider our \bar X, \bar Y, \bar Z function over a spectrum less wide, so that we can find a significant minimum for the function \bar X+ \bar Y+\bar Z.
For example, on your graph, we could consider the interval [420,650] instead of [370,750].
Of course, we would make an error, and I don’t know how problematic this is.
We can consider any linear combination of \bar X, \bar Y, \bar Z with non null coefficients, as such combination will give results strictly positive as long as at least one of them is strictly positive on each part of our wavelengths interval.
\bar f = \alpha_x \bar X + \alpha_y \bar Y + \alpha_z \bar Z
Let’s call \bar f_{min} the minimum of \bar f over the considered interval.
We have: \alpha_x X + \alpha_y Y + \alpha_z Z = \int_\Omega I(\lambda) \times ( \alpha_x \bar X(\lambda) + \alpha_y \bar Y(\lambda) + \alpha_z \bar Z(\lambda) ) d\lambda
Which gives: \alpha_x X + \alpha_y Y + \alpha_z Z \geq \bar f_{min} \times \int_\Omega I(\lambda) d\lambda
Thus: E \leq \dfrac{\alpha_x X + \alpha_y Y + \alpha_z Z }{ \bar f_{min} }
We can try different \alpha values to try to get the higher lower bound possible.
However, all the problem with this upper bound is how to choose the interval in order to get a significant bound without making too much errors.
anyway, more general comment: thanks for starting this discussion. I find it quite interesting. Unfortunately I don’t have the necessary physics background to contribute to your analysis, but I’m certainly interested in the outcomes.
I can only contribute with my empirical observations, that match more or less what you wrote in your initial post. Using max as a norm gives not so pleasing results (in particular, it tends to compress blue skies too much). Euclidan norm works better in my experiments, and so does luminance. But I don’t have much physical justifications I’m afraid…
Ah. Found that https://jo.dreggn.org/home/2015_spectrum.pdf by @hanatos (it’s a small World), so maybe we can compute an approximation of I(\lambda) after all (from XYZ) and then numerically integrate it so the energy computation is direct (but expensive).
… if you’re on the search for fast spectral upsampling, may i suggest you also look into this one: https://jo.dreggn.org/home/2019_sigmoid.pdf ? caveat may be that colours in images will encode emission and not reflectances, so you’d need to scale before and after upsampling.
and yes, if i may add: i find this topic super interesting. the distortion in chroma that a tonecurve brings has always annoyed me and i think we can do better by doing things in spectral. the upsampling is really only using a couple fma + one reciprocal sqrt instruction and can be executed in SIMD on many wavelengths quite efficiently. i’ll be excited to hear about any more ideas or results in this direction.
Would it be reasonable to estimate the spectral response of each sensor by taking a Gaussian around, let’s say, 454 nm, 540 nm and 610 nm? See e.g. https://www.dxomark.com/About/In-depth-measurements/Measurements/Color-sensitivity for a sketch.
That could give you a starting point to try out if the energy-oriented method actually works.
@snibgo in my experience, Y works reasonably well (e.g. it’s what is used in the dynamic range compression tool of RT), whereas L of Lab produces quite unnatural results. I’m sorry I can’t provide a more meaningful/quantitative answer, but my knowledge in these topics is too limited for that.
Yes, I have long been wrestling with Lab. When I change L values, I need to adjust C ones to compensate in order to get more natural results and vice versa. There are other Lab-like spaces but I haven’t tested those because they aren’t readily available.