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.