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.
Procedure: srgb_to_linear normalises integer dtypes to [0, 1] while removing the transfer function (IEC 61966-2-1), then the sRGB (D65)→XYZ 3x3 matrix is applied to linear RGB. White (1, 1, 1) maps to (0.9505, 1.0, 1.0890) (a scale with Y normalised to 1).
• Input: any shape as long as the last axis is 3 (1 colour (3,), a colour table (N, 3), an image (H, W, 3)). Integer dtypes (uint8/uint16 etc.) are divided by the dtype maximum. float that does not lie in [0, 1] gives MetricContractError (ValueError subtype). Note that passing linear values with gamma already removed removes the gamma twice.
• Return value: float64 of the same shape as the input.
• Failure: the last axis is not 3 / float outside [0, 1] / non-finite.
The usual next step is to chain xyz_to_lab (rgb_to_lab does both).
• image_difference_metrics family guide
• colorimetry — Colorimetry and spectra — colour is fixed only by spectrum × illuminant × observer
• 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)xyz_to_lab · luma_limited_u8 · rank_data · tid2013_index
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.