colorspace op• Data kinds: rgbimage → rgb
• Call: import fullseye as fs; fs.ledger.rgb_to_xyz(rgb) (to call the implementation directly, import imgmetrics; imgmetrics.rgb_to_xyz(rgb); from the registry, opsimgmetrics.get("rgb_to_xyz"))
sRGB (`(..., 3)`) → CIE XYZ. The transfer function is removed first, then the matrix is applied.
> The detailed description below is the original text — the summary and the headings are translated.
手順: `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 family guide
• colorimetry — 測色と分光の知識 — 色は「分光 × 光源 × 観測者」でしか決まらない
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• image_quality_metrics — py -3.11 examples/image_quality_metrics.py
rgb as input)colorspace)rgb_to_lab · lab_to_rgb · xyz_to_lab
*Provenance: imgmetrics.py — IMGMETRICS operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.