为什么RGB到XYZ颜色转换有这样的区别? [英] Why is there such a difference between RGB to XYZ color conversions?
问题描述
最近我一直试图理解在RGB颜色空间和CIE-XYZ颜色空间之间转换的代码,但似乎每个不同的计算器,我尝试给我完全不同的结果。
例如,尝试将(255,100,70)转换为XYZ会产生以下结果,即使明确使用d50作为一切:
Recently I have been trying to understand code that converts between the RGB color space and the CIE-XYZ color space, but it seems like every different calculator I try gives me radically different results. For example, trying to convert (255, 100, 70) to XYZ yields the following result, even when explicitly using d50 for everything:
- EasyRGB 提供(46.903,30.817,9.270)
- Wolfram Alpha 提供(0.7493 ,0.7245,0.6308)
- Bruce Lindbloom.com给出了(0.493910,0.317574,0.070047)
- Java给出(0.95880127,0.99554443,0.8227539) li>
- EasyRGB gives (46.903, 30.817, 9.270)
- Wolfram Alpha gives (0.7493, 0.7245, 0.6308)
- Bruce Lindbloom.com gives (0.493910, 0.317574, 0.070047)
- Java gives (0.95880127, 0.99554443, 0.8227539)
我看不出这些可能给出不同的答案。哪一个是正确的(如果有)?
I don't see how these could possibly give such different answers. Which one is correct (if any)? Is there some sort of parameter that I am missing that differs between these websites?
推荐答案
因为有不同的RGB空间,不只是一个。
Because there are different RGB spaces, not just one.
在此页面上有以下通用公式:
On this page there is the general formula:
http://brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html
但通式取决于一些参数,例如矩阵M,其对于每个单独的RGB空间是不同的。
but the general formula depends on some parameters e.g. matrix M, which is different for each individual RGB space.
这篇关于为什么RGB到XYZ颜色转换有这样的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!