Skip to main content
Developers/接口参考

TouchGlove API

Imprint Glove 高级函数与 TouchGlove 类方法索引。

On this page

导入接口

Python
from imprintx.glove import (
    TouchGlove, stream, show_gui,
    save_image, record_video, list_ports
)

高级函数

签名用途
stream(port=None, callback=None, duration=None)连接设备并输出实时数据
show_gui(port=None, model=None, device="auto")显示五通道图像、位移与力场
save_image(port=None, output_dir=".", prefix="tactile", save_grid=True)保存通道快照与组合网格
record_video(port=None, output_path="output_h265.mp4", duration=5.0, fps=30.0)录制 H.265 网格视频与时间戳
list_ports()扫描可用串口
load_video_timestamps(path: str)加载录像时间戳 JSON

TouchGlove:连接与采集

方法用途
open(port) / close()打开 / 关闭连接
start() / stop()开始 / 停止数据流
poll() → FrameBatch读取最新五通道帧批次
calibrate_baseline(duration_sec=1.0)重新标定零点
get_dense_fields()获取 (5, 32, 32, 3) 三维位移 / 力场

TouchGlove:设备与录像

接口来自项目SDK 参考。本文不定义原文未给出的返回值字段、错误类型或额外设备能力。

方法用途
get_sn() / set_sn(sn)读取 / 写入设备序列号
sync_rtc() / query_rtc()同步 / 查询 RTC
start_recording(output_path) / stop_recording()开始 / 停止录像