Merge branch 'feature/finger_docs' into dev
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -30,7 +30,7 @@ class SingleCameraFrameProcessor:
|
||||
return frame
|
||||
|
||||
|
||||
class UVUnrollFrameProcessor:
|
||||
class FrameUnwarper:
|
||||
"""Remap a raw camera frame into a flattened UV-domain BGR image."""
|
||||
|
||||
def __init__(
|
||||
@@ -230,7 +230,7 @@ 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,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
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user