dd02 setting tune + change Class name from UVUnrollFrameProcessor to FrameUnwarper

This commit is contained in:
ykcheungab
2026-07-14 20:00:40 +08:00
parent c2fb0b12b5
commit 30f9deb5b2
14 changed files with 275 additions and 94 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import cv2
import numpy as np
from ..configs import load_config
from ..frame_processors import UVUnrollFrameProcessor
from ..frame_processors import FrameUnwarper
from ..sensor import Sensor
from ..unroll import (
build_or_load_domain,
@@ -208,7 +208,7 @@ class FingerRuntime:
geometry: FingerGeometry,
domain,
tactile: TactileProcessor,
frame_processor: UVUnrollFrameProcessor,
frame_processor: FrameUnwarper,
capture,
):
self.geometry = geometry
@@ -268,7 +268,7 @@ class FingerRuntime:
raise RuntimeError("Cannot open camera/video source")
sensor = Sensor("external", config_name=config, verbose=verbose, mirror=mirror)
frame_processor = UVUnrollFrameProcessor(
frame_processor = FrameUnwarper(
domain.remap,
camera_matrix=geometry.source_K if geometry.dist_coeffs is not None else None,
dist_coeffs=geometry.dist_coeffs,
+2 -2
View File
@@ -27,7 +27,7 @@ class SingleCameraFrameProcessor:
return frame
class UVUnrollFrameProcessor:
class FrameUnwarper:
"""Remap a raw camera frame into a flattened UV-domain BGR image."""
def __init__(
@@ -227,5 +227,5 @@ def create_frame_processor(sensor_type, stitcher=None, uv_remap=None, **uv_kwarg
if sensor_type in ("uv_unroll", "unroll"):
if uv_remap is None:
raise ValueError("UV unroll sensor requires a UVRemap instance.")
return UVUnrollFrameProcessor(uv_remap, **uv_kwargs)
return FrameUnwarper(uv_remap, **uv_kwargs)
raise ValueError(f"Unsupported sensor type: {sensor_type}")
+1 -1
View File
@@ -1,7 +1,7 @@
"""UV-based finger mesh unroll / flatten pipeline.
Offline: Blender export -> build_or_load_domain -> unroll_map_uv.npz
Runtime: live camera frame -> UVUnrollFrameProcessor -> Sensor (with valid_mask)
Runtime: live camera frame -> FrameUnwarper -> Sensor (with valid_mask)
3D display: UVDomain.surface.world_xyz
"""