From: Steinar H. Gunderson Date: Mon, 30 Dec 2013 01:33:50 +0000 (+0100) Subject: Fix a minor error in one of the color temperature constants. X-Git-Tag: 1.0~101 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=9ad1a31f02c3de450c650191cc40a194506807bc Fix a minor error in one of the color temperature constants. 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. --- diff --git a/white_balance_effect.cpp b/white_balance_effect.cpp index 56cd8c9..a52af6a 100644 --- a/white_balance_effect.cpp +++ b/white_balance_effect.cpp @@ -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; }