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.

method="coarse" (default): for each block of coarse × coarse bins a representative (the bin with the most rows) is placed, the top topk blocks closest in colour are selected, and only the 3 × 3 blocks around each of them are compared bin by bin (coarse → fine). "exact": brute force over all bins (the reference). Colour → normal is multimodal (distant bins have nearly the same colour), so coarse → fine does not necessarily pick the same bin as brute force: on the first real device about 90 % agree, and for the pixels that differ the median angular error is almost the same (measured by a gate). Outside mask the result is (0, 0, 1). min_count is the lower bound on the row count of bins that are used: 1 is fine for noise-free synthetic data, but on the real device the colour mean of single-row bins (624 of them in the 24 calibration images of the first device) is pure noise, and leaving it at 1 biases the recovered depth by +18 % (+6 % with 10 rows or more). Conversely, looking up only in bins with fitted position terms (min_count=min_rows_poly) makes slopes of 0–15° a dead zone. Raises ValueError: shape / mask shape / misspelled method / coarse, topk or chunk below 1 / 0 usable bins / image size differs in the position-dependent version.

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.