GUI for finger v1
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user