gradient_lut_invert — DRIVE tacscalib op

• Data kinds: rgb × table × image2d → normalmap

• Call: import fullseye as fs; fs.ledger.gradient_lut_invert(rgb, table: 'dict', mask=None, min_count: 'int' = 1, method: 'str' = 'coarse', coarse: 'int' = 3, topk: 'int' = 2, chunk: 'int' = 1024) -> 'np.ndarray' (to call the implementation directly, import tacscalib; tacscalib.gradient_lut_invert(rgb, table: 'dict', mask=None, min_count: 'int' = 1, method: 'str' = 'coarse', coarse: 'int' = 3, topk: 'int' = 2, chunk: 'int' = 1024) -> 'np.ndarray'; from the registry, opsdrive.get("gradient_lut_invert"))

Usage

RGB (H, W, 3) → normals (H, W, 3): the center normal of the non-empty bin (count ≥ min_count) whose color is closest. For the position-dependent table (gradient_lut_build given positions), each bin's color is first predicted at the pixel position and then compared.

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

method="coarse"(既定): coarse × coarse ビンの区画ごとに代表(行の最も多いビン)を置いて色の近い上位 topk 区画を選び、それぞれの周り 3 × 3 区画だけ全ビンを比べる(粗 → 細)。"exact": 全ビンの総当たり(基準)。色 → 法線は多峰(離れたビンがほぼ同じ色を持つ)なので、粗 → 細は総当たりと同じビンを選ぶとは限らない: 実機の 1 台目で一致は約 9 割、外れた画素も角誤差の中央値はほぼ同じ(門で測る)。mask の外は (0, 0, 1)。min_count は使うビンの行数の下限: ノイズの無い合成なら 1 でよいが、実機では 1 行だけのビン(1 台目の較正 24 枚で 624 個)の色の平均がノイズそのもので、1 のままだと復元した深さが +18 % 偏る(行 10 以上で +6 %)。逆に位置の項を当てたビンだけ(min_count=min_rows_poly)で引くと傾き 0〜15° が不感帯になる。Raises ValueError: 形 / mask の形 / method の綴り / coarse・topk・chunk が 1 未満 / 使えるビンが 0 / 位置依存版で画像の大きさが違う。

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)

• poc_tacscalib_sphere_lut — py -3.11 examples/poc_tacscalib_sphere_lut.py

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

spin_from_marker_sequence · carla_transform_matrix · carla_pose_to_world · carla_camera_pose · carla_xy_yaw · carla_scene_load · town_chain · osm_parse

Same category (tacscalib)

calib_pack_load · sphere_normals_known · lights_fit_from_sphere · membrane_predict_rgb · gradient_lut_build · normal_error_map · sphere_cap_height · field_position_sweep


*Provenance: tacscalib.py — DRIVE 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.