colorspace oprgb → labimport fullseye as fs; fs.ledger.xyz_to_lab(xyz, white=(0.95047, 1.0, 1.08883)) (実装を直接呼ぶなら import imgmetrics; imgmetrics.xyz_to_lab(xyz, white=(0.95047, 1.0, 1.08883))、台帳から引くなら opsimgmetrics.get("xyz_to_lab"))CIE XYZ → CIE 1976 L*a*b*。既定の白色点は D65 2°。
式: t = XYZ / white として f(t) = cbrt(t)(t > (6/29)^3)、
それ以外は t / (3 (6/29)^2) + 4/29。L = 116 f(Y) - 16、
a = 500 (f(X) - f(Y))、b = 200 (f(Y) - f(Z))。
xyz: 最後の軸が 3 の任意の形。rgb_to_xyz の出力と同じ、Y = 1 が白の尺度。white: 白色点 (Xn, Yn, Zn) の 3 つの正の数。既定 D65_WHITE =
(0.95047, 1.0, 1.08883)。別の光源(D50 など)で撮った XYZ ならここを変える。L は白で 100、黒で 0。a/b は符号つき。MetricContractError): 最後の軸が 3 でない / white が 3 要素でない、
または 0 以下を含む。XYZ の値域は検査しない(負や 1 超もそのまま計算する)。delta_e_76 / delta_e_2000 はこの Lab を入力にする。
py -3.11 examples/image_quality_metrics.pylab を入力に取れる)lab_to_rgb · delta_e_2000 · delta_e_76
colorspace)rgb_to_lab · lab_to_rgb · rgb_to_xyz
Provenance: imgmetrics.py — IMGMETRICS operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.