从颜色匹配函数中计算出XYZ颜色域的边界量如何正确缩放?

发布于 2025-01-30 00:15:21 字数 991 浏览 2 评论 0 原文

计算xyz范围边界网格下面来自频谱样本/颜色匹配函数,如何将所得的体积扩展到与流行色彩空间(如srgb)(例如srgb)的兼容性?更具体地说,音量的大小和比例取决于样品数量以及用于计算它的积分近似方法。那么,如何确定缩放此类量的正确值以匹配已知的颜色空间,例如SRGB,P3-Display,NTSC,PAL等?

似乎适合整个卷,以使y的范围从[0,1]起作用,但它有几个问题:

  1. 与通过转换来产生的子量相比srgb颜色立方体到XYZ空间,结果在“全范围”外突出。 ://i.sstatic.net/ztmcn.png“ alt =” srgb-> xyz卷突出xyz全范围。>
  2. 将随机xyz值从完整的范围转换为srgb and srgb and back,最终,最终XYZ与初始一个不匹配。

大多数(全部?)标准化的颜色空间来自CIE XYZ,因此每个颜色空间都必须具有某种函数或转换为the XYZ范围,或者至少每个都必须具有某些独特的参数来进行一般函数。

如何确定正确的函数及其参数?

After computing the XYZ gamut bounding mesh below from spectral samples/color matching functions, how does one scale the resulting volume for compatibility with popular color spaces such as sRGB? More specifically, the size and scale of the volume depends on the number of samples and the integral approximation method used to compute it. How, then, can one determine the right values to scale such volumes to match known color spaces like sRGB, P3-Display, NTSC, PAL, etc?

oddly scaled CIE XYZ color gamut bounding volume.

It seemed like fitting the whole volume so that Y ranges from [0, 1] would work, but it had several problems:

  1. When compared to a sub-volume generated by converting the sRGB color cube to XYZ space, the result protruded outside of the 'full gamut'.sRGB->XYZ volume protruding beyond the XYZ full gamut.
  2. Converting random XYZ values from the full gamut volume to sRGB and back, the final XYZ doesn't match the initial one.

Most (all?) standardized color spaces derive from CIE XYZ, so each must have some kind of function or transformation to and from the full XYZ Gamut, or at least each must have some unique parameters for a general function.

How does one determine the correct function and its parameters?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

故乡的云 2025-02-06 00:15:21

简短的答案

,如果我理解您的问题,您正在尝试完成的是确定相对于您构建的XYZ空间的SRGB范围限制(边界)。

更长的答案

我假设您不是要完成范式映射。这是非平凡的,并且有多种方法(感知,绝对,相对等)。我将放在一边绘制范围映射,而是专注于确定XYZ卷中的一些任意色彩空间。

首先回答您的粒状问题:

从光谱样品中计算下面的xyz域边界网格后,如何将体积与流行颜色空间(例如srgb?

)缩放。

哪些光谱样本?通过分光光度计,在给定的标准照明剂下读取测试印刷品?还是他们来自哪里?颜色匹配实验?

数学是整合光谱数据以形成XYZ空间的问题,您显然已经完成了。什么亮点(白点)?

似乎适合整个卷,因此y的范围从[0,1]起作用,但有几个问题:

全部卷? SRGB空间?您是如何将SRGB数据转换为YXZ的? 这真的是您要问的问题吗?

适当的缩放常数是什么?

它们取决于频谱数据和光谱数据的适应性白点。 SRGB为D65。大多数打印是使用D50完成的。

每个颜色空间是否具有X,Y和Z值的范围?我该如何确定它们?

是。

每个彩色空间都有不同的转换矩阵,具体取决于RG和B初选的坐标。初选可以是虚构的,例如先知。

一些东西

您正在寻找的数学可以在 colorscience ,一个python库,它是瑞士的颜色的刀刀。

srgb

xyz是一个线性光空间,其中<​​code> y = 0.2 to y = 0.4 是亮度的加倍。

SRGB不是线性空间,SRGB数据上有伽马曲线或音调响应曲线,因此 rgb(20,20,20) to rgb(40,40,40)< /代码>不是亮度的加倍。

需要完成的第一件事是将SRGB颜色数据线性化。

然后取线性RGB并通过适当的矩阵运行。如果XYZ数据相对于不同的适应白点,则需要执行像Bradford变换之类的事情,以将其转换为适合您的XYZ空间。

Bruce Lindbloom网站具有一些常见情况的现成矩阵。

您所描述的问题可能是由于(或两者都)无法线性化SRGB数据和/或不适应白点而引起的。而且...可能是其他因素。

如果您可以回答有关光谱数据源的问题,我可以更好地提供帮助。

Short answer

If I understand your question, you are trying to accomplish is determining the sRGB gamut limits (boundary) relative to the XYZ space you have constructed.

Longer answer

I am assuming you are NOT trying to accomplish gamut mapping. This is non-trivial, and there are multiple methods (perceptual, absolute, relative, etc). I'm going to set gamut mapping aside, and instead focus on determining how some arbitrary color space fints inside your XYZ volume.

First to answer your granular questions:

After computing the XYZ gamut bounding mesh below from spectral samples, how does one scale the volume for compatibility with popular color spaces such as sRGB?

What spectral samples? From a spectrophotometer reading a test print under a given standard illuminant? Or where did they come from? A color matching experiment?

The math is a matter of integrating the spectral data to form the XYZ space, which you apparently have done. What illuminant (white point)??

It seemed like fitting the whole volume so that Y ranges from [0, 1] would work, but it had several problems:

Whole volume of what? The sRGB space? How did you convert the sRGB data to YXZ? OR is this really the question you are asking?

What are the proper scaling constants?

They depend on the spectral data and the adapted white point for the spectral data. sRGB is D65. Most printing is done using D50.

Does each color space have its own ranges for x, y, and z values? How can I determine them?

YES.

Every color space has a different transformation matrix depending on the coordinates of the R G and B primaries. The primaries can be imaginary, such as in ProPhoto.

Some Things

The math you are looking for you can find at brucelindbloom.com and also, you might want to check out Thomas Mansencal's ColorScience, a python library that's the swiss-army-knife of color.

sRGB

XYZ is a linear light space, wherein Y = 0.2 to Y = 0.4 is a doubling of luminance.

sRGB is not a linear space, there is a gamma curve or tone response curve on sRGB data, such that rgb(20,20,20) to rgb(40,40,40) is NOT a doubling of luminance.

The first thing that needs to be done is linearize the sRGB color data.

Then take the linear RGB and run it through the appropriate matrix. If the XYZ data is relative to a different adapting white point, then you need to do something like a Bradford transform to convert to the appropriate one for your XYZ space.

The Bruce Lindbloom site has some ready-to-go matrixes for a couple common situations.

The problem you are describing can be caused by either (or both) failing to linearize the sRGB data and/or not adapting the white point. And... possibly other factors.

If you can answer my questions regarding the source of the spectral data I can better assist.

苦行僧 2025-02-06 00:15:21

进一步的研究和实验表明,XYZ的体积应缩放,以使{max(x),max(y),max(z)}应等于工作空间中的照明剂。在SRGB的情况下,该发光剂(也称为白点)称为D65。

结果看起来令人信服,但专家确认仍然会不胜感激。

Further research and experimentation implied that the XYZ volume should scale such that { max(X), max(Y), max(Z) } should equal the illuminant from the working space. In the case of sRGB, that illuminant (also called white point) is called D65.

Results look convincing, but expert confirmation would still be appreciated.

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文