]> git.sesse.net Git - movit/commitdiff
Fix a minor error in one of the color temperature constants.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 30 Dec 2013 01:33:50 +0000 (02:33 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 30 Dec 2013 01:33:50 +0000 (02:33 +0100)
Wikipedia cites http://icpr.snu.ac.kr/resource/wop.pdf/J01/2002/041/R06/J012002041R060865.pdf,
but seems to differ in in the last decimal of one of the coefficients.
The error is, of course, inconsequential, but it's good to be correct
in any case, and I trust the paper more.

white_balance_effect.cpp

index 56cd8c96b853306a776e878b0f6e481092053fd0..a52af6a87fd1992d65e03e5136717c53b7b0d5e6 100644 (file)
@@ -22,7 +22,7 @@ Vector3d convert_color_temperature_to_xyz(float T)
        assert(T <= 15000.0f);
 
        if (T <= 4000.0f) {
-               x = ((-0.2661239e9 * invT - 0.2343580e6) * invT + 0.8776956e3) * invT + 0.179910;
+               x = ((-0.2661239e9 * invT - 0.2343589e6) * invT + 0.8776956e3) * invT + 0.179910;
        } else {
                x = ((-3.0258469e9 * invT + 2.1070379e6) * invT + 0.2226347e3) * invT + 0.240390;
        }