added uv unwarp export

This commit is contained in:
ykcheungab
2026-09-25 17:10:05 +08:00
parent c377c14474
commit f91ac9d3db
8 changed files with 1065 additions and 220 deletions
+23 -11
View File
@@ -11,10 +11,18 @@ artifacts:
- housing.npz
- camera_intrinsics.npz
- world_to_cam.npy
# The unwarp/valid-mask domain, built by `orisys-design export` from the uv_map: block
# below (SDK precompute; no Blender, so it can be rebuilt without the .blend). Listing it
# here makes a missing mask fail the export instead of shipping a bundle that renders grey.
# The name carries source_scale: 0.42 -> `scaled_map_cache_path` names it _s0.42, and the
# runtime must be told the same scale (sensor.json camera.source_scale) or it looks for a
# differently-named cache and rebuilds one at a mismatch.
- unroll_map_uv_s0.42.npz
# Measured unroll maps stay in SDK (not overwritten by nominal export).
runtime_owned_by_sdk:
- unroll_map_uv_s0.4.npz
# Nothing: the unroll map used to be listed here as SDK-owned. It is now an export artifact,
# and the SDK asset copy (orisys-sdk/sensors/finger/assets/<rev>/unroll_map_uv_s0.42.npz) is
# updated only when this revision is promoted - gated by tools/scene_assets/compare_uv_map.py.
runtime_owned_by_sdk: []
# Parameters of the unroll/valid-mask domain. Recorded here because the mask decides which
# part of the sensing mesh the application treats as *sensing* (everything else renders
@@ -24,8 +32,10 @@ runtime_owned_by_sdk:
# source size produced 0.8 % island coverage instead of 40.8 %.
# * source_K must be scaled by source_scale (orisys.unroll.geometry.scale_camera_geometry).
# Passing the native K produced 3.5 % instead of 40.8 %.
# Rebuild with tools/build_uv_map.py --profile <this file>; it writes into output_dir first
# and is promoted to the SDK asset dir only after tools/scene_assets/compare_uv_map.py agrees.
# Rebuild with `orisys-design export <revision> --profile compute`, which writes the map
# into output_dir in the same run; tools/build_uv_map.py is the standalone equivalent for a
# rebuild without Blender (same module, same parameters). Either way the map is promoted to
# the SDK asset dir only after tools/scene_assets/compare_uv_map.py agrees.
uv_map:
out_width: 280 # = camera.resolution_stitch[0]; the field domain the app sees
out_height: 300 # = camera.resolution_stitch[1]
@@ -37,12 +47,14 @@ uv_map:
# * 1280x720 camera -> max(280/1280, 300/720) = 0.417 (source 533x300)
# * 1920x1080 camera -> max(280/1920, 300/1080) = 0.278 (source 533x300 — the same grid,
# because the rule follows the *output* requirement, not the camera)
# 0.4 is pinned because it is the value the running system and the existing recordings were
# measured at; at a 1280x720 camera it yields a 512x288 source, i.e. 4 % coarser than the
# 300-row output (mild upsampling). Changing it changes the flow magnitudes the app's
# thresholds were tuned against AND the map's field_domain_id, so it must move together with
# sensor.json's camera.source_scale and a recompiled scene package.
source_scale: 0.4
# 0.42 is the chosen value: the derived floor for a 1280x720 camera is 0.417 (source 533x300),
# and 0.42 gives 538x302 — just above the 280x300 output grid, so the remap *resamples* rather
# than upsamples and the final resolution is unchanged. That is the point: slightly coarser than
# native buys per-frame headroom in the resize/undistort/remap path without touching the result.
# Changing it still changes the map's field_domain_id and the flow magnitudes the app's
# thresholds were tuned at, so it moves together with sensor.json's camera.source_scale and a
# recompiled scene package — never on its own.
source_scale: 0.42
edge_band: 0.12
edge_expand: 1.0 # <= 1.0 means "resolve from the measured UV distortion"