gradient_lut_invert — DRIVE tacscalib op

• 資料種類:rgb × table × image2d → normalmap

• 呼叫: 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'(要直接呼叫實作,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';從台帳取用則 opsdrive.get("gradient_lut_invert"))

用法

RGB (H, W, 3) → 法線 (H, W, 3):在非空 bin(count ≥ min_count)中取顏色最接近者的中心法線。位置相依版的表(向 gradient_lut_build 傳入 positions 所得)先依像素位置預測各 bin 的顏色,再進行比較。

> 以下的詳細說明為原文 —— 摘要與標題已翻譯。

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 / 位置依存版で画像の大きさが違う。

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

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

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• poc_tacscalib_sphere_lut — py -3.11 examples/poc_tacscalib_sphere_lut.py

型別可銜接的下一個運算子(可接受 normalmap 作為輸入)

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

同類別(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 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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