split example visualizaiton pipeline
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Finger-specific OpenCV panels for example scripts."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import cv2
|
||||
import orisys
|
||||
|
||||
from .opencv_maps import depth_colormap
|
||||
|
||||
|
||||
def show_finger_uv_panels(
|
||||
unrolled,
|
||||
vnormal,
|
||||
depth_map,
|
||||
*,
|
||||
flow_threshold: float = 0.4,
|
||||
grid_spacing: int = 20,
|
||||
arrow_scale: float = 1.0,
|
||||
) -> None:
|
||||
"""Show depth colormap and UV unrolled flow arrows."""
|
||||
cv2.imshow("Depth", depth_colormap(depth_map))
|
||||
arrows = orisys.util.draw_arrows(
|
||||
unrolled,
|
||||
vnormal,
|
||||
threshold=flow_threshold,
|
||||
grid_spacing=grid_spacing,
|
||||
arrow_scale=arrow_scale,
|
||||
)
|
||||
cv2.imshow("UV Unrolled", arrows)
|
||||
Reference in New Issue
Block a user