color_lut — GFX2D post op

• 数据种类:无 → lut(仅由参数决定的算子 —— 不接受图像或数据输入)

• 调用: import fullseye as fs; fs.ledger.color_lut(size=17, gain=(1.0, 1.0, 1.0), lift=(0.0, 0.0, 0.0), gamma=(1.0, 1.0, 1.0), saturation=1.0)(要直接调用实现,import gfx2d; gfx2d.color_lut(size=17, gain=(1.0, 1.0, 1.0), lift=(0.0, 0.0, 0.0), gamma=(1.0, 1.0, 1.0), saturation=1.0);从台账取用则 opsgfx2d.get("color_lut"))

• GPU:无(仅 CPU 参考实现)

用法

构建 3-D 色彩 LUT (n, n, n, 3),索引为 [r, g, b]。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

out = lift + gain * in**gamma per channel, then saturation is applied about the Rec. 709 luma and the result is clipped once. With all defaults this is the identity LUT, and because trilinear interpolation is exact for a function that is linear in each variable, color_grade with the identity LUT is the identity to float64 rounding (measured maximum 3.3e-16 at size 17 and 2.2e-16 at size 2) — the property the suite uses to prove the interpolation itself is right before testing any grade.

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者、年份)与用途见上面的族使用指南。

可运行的示例(实际调用该算子并已验证的样例)

• genspark_external_review — py -3.11 examples/genspark_external_review.py

• gfx2d_scene — py -3.11 examples/gfx2d_scene.py

类型可衔接的下一个算子(可接受 lut 作为输入)

color_grade

同类别(post)

bloom · vignette · chromatic_aberration · film_grain · color_grade · dither · palette_quantize


*Provenance: gfx2d.py — GFX2D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.