lab_to_rgb — IMGMETRICS colorspace op

Data kinds: labrgbimage

Call: import fullseye as fs; fs.ledger.lab_to_rgb(lab, white=(0.95047, 1.0, 1.08883)) (to call the implementation directly, import imgmetrics; imgmetrics.lab_to_rgb(lab, white=(0.95047, 1.0, 1.08883)); from the registry, opsimgmetrics.get("lab_to_rgb"))

Usage

CIE L\*a\*b\* → sRGB `[0, 1]. **Out-of-gamut colours are clipped**, so a round trip through rgb_to_lab` only matches inside the gamut (pinned by a test).

> The detailed description below is the original text — the summary and the headings are translated.

手順: `fy = (L + 16) / 116fx = fy + a / 500fz = fy - b / 200` を

`xyz_to_lab の逆関数で XYZ に戻し(white` を掛ける)、XYZ→線形 RGB の

逆行列を掛けてから sRGB の伝達関数を掛ける。伝達関数の手前で線形 RGB を

`[0, 1]` に 無言でクリップする ―― ここが「色域外は切り詰め」の実体で、

例外は出ない。

• `lab`: 最後の軸が 3 の任意の形。

• `white: rgb_to_lab` で使ったものと同じ白色点を渡す(検証はしない)。

• 返り値: 入力と同じ形の float64、値域 `[0, 1]` のガンマ付き sRGB。

8 bit にするなら呼び出し側で 255 倍して丸める。

• 失敗(`MetricContractError`): 最後の軸が 3 でない。

Detailed usage guide

image_difference_metrics family guide

Background guides (the physics and conventions behind this op)

colorimetry — 測色と分光の知識 — 色は「分光 × 光源 × 観測者」でしか決まらない

References (sample data, literature)

• 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.

Runnable examples (verified samples that actually call this op)

image_quality_metricspy -3.11 examples/image_quality_metrics.py

Ops the type connects to (they accept rgbimage as input)

rgb_to_lab · rgb_to_xyz · delta_e_map

Same category (colorspace)

rgb_to_lab · rgb_to_xyz · 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.