GUI for finger v1

This commit is contained in:
ykcheungab
2026-06-18 22:18:19 +08:00
parent f19f092b64
commit 3fd9b839a9
42 changed files with 2326 additions and 1186 deletions
+35
View File
@@ -0,0 +1,35 @@
"""Pure numpy→BGR render helpers for finger 2D panels (no window I/O)."""
from __future__ import annotations
import orisys
from .opencv_maps import depth_colormap
def render_depth_panel(depth_map):
"""Return a BGR depth colormap image."""
return depth_colormap(depth_map)
def render_uv_arrows(
unrolled,
vnormal,
*,
flow_threshold: float = 0.4,
grid_spacing: int = 20,
arrow_scale: float = 1.0,
):
"""Return a BGR image with UV unrolled flow arrows."""
return orisys.util.draw_arrows(
unrolled,
vnormal,
threshold=flow_threshold,
grid_spacing=grid_spacing,
arrow_scale=arrow_scale,
)
def render_contact_panel(img, contour, centroid):
"""Return a BGR contact overlay on the raw sensor image."""
return orisys.util.draw_contact(img, contour, centroid)