From 9ad1a31f02c3de450c650191cc40a194506807bc Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 30 Dec 2013 02:33:50 +0100 Subject: [PATCH] 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. --- white_balance_effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2