colorspace op• 数据种类:rgbimage → rgb
• 调用: import fullseye as fs; fs.ledger.rgb_to_xyz(rgb)(要直接调用实现,import imgmetrics; imgmetrics.rgb_to_xyz(rgb);从台账取用则 opsimgmetrics.get("rgb_to_xyz"))
sRGB((..., 3))→ CIE XYZ。先去掉传递函数,再乘矩阵。
步骤:用 srgb_to_linear 把整数 dtype 归一化到 [0, 1] 并去除传递函数(IEC 61966-2-1),再对线性 RGB 乘以 sRGB(D65)→XYZ 的 3x3 矩阵。白 (1, 1, 1) 映射到 (0.9505, 1.0, 1.0890)(Y 归一化为 1 的尺度)。
• 输入:只要最后一轴为 3,形状任意((3,) 的 1 种颜色、(N, 3) 的颜色表、(H, W, 3) 的图像)。整数 dtype(uint8/uint16 等)除以 dtype 的最大值。float 不在 [0, 1] 内则 MetricContractError(ValueError 的子类型)。注意若传入已去除伽马的线性值,会两次去除伽马。
• 返回值:与输入同形的 float64。
• 失败:最后一轴不是 3 / float 在 [0, 1] 之外 / 非有限。
接下来通常接 xyz_to_lab(合起来就是 rgb_to_lab)。
• image_difference_metrics 族使用指南
• colorimetry — 测色与光谱知识 —— 颜色只由“光谱 × 光源 × 观察者”决定
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• image_quality_metrics — py -3.11 examples/image_quality_metrics.py
rgb 作为输入)xyz_to_lab · luma_limited_u8 · rank_data · tid2013_index
colorspace)rgb_to_lab · lab_to_rgb · xyz_to_lab
*Provenance: imgmetrics.py — IMGMETRICS 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.