Commit Graph

16 Commits

Author SHA1 Message Date
ykcheungab e9710e140b 精简 Finger 示例的标定启动参数
从配置包读取几何资源,并提供显式无载荷启动置零。30 项测试、静态检查及现有录像验证通过。
2026-10-18 13:10:45 +08:00
ykcheungab 34cb83d4a4 修正示例中的三轴力单位显示
避免未标定读数被示例标成 N,并让 Finger 示例读取 SDK 的每轴单位。已通过相关测试和语法检查。
2026-10-05 13:10:58 +08:00
ykcheungab b5d7533e24 examples: make StreamPipeline the recommended entry, archive the manual loop
The two canonical examples taught the advanced path: they sequenced
get_img() -> compute_deformation() -> compute_contact() -> read_info() by hand
and unpacked a 13-element tuple positionally, which is what led developers to
reach for the compute backend, the capture queue and the stitch mode. The
managed alternative already existed and was documented nowhere.

Library (add-only, nothing removed):

- FrameSnapshot.image_size_raw carries the capture resolution, so a caller can
  compare it with the processed frame instead of reaching into Sensor.
- StreamPipeline.reset() resets the tracker and force filters *safely*. It is
  queued and applied by the flow stage before its next frame, never inline:
  Sensor.reset rebases initial_img on the current Sensor.img, which the flow
  stage is reading concurrently, so a caller-thread reset would capture a
  half-written reference frame. Idempotent.
- TactileProcessor.pipeline(produce) and FingerRuntime.pipeline() build a
  pipeline without the caller naming a backend concept; the latter is
  `with runtime.pipeline(contact=True) as pipe`.

Examples:

- examples/basic_pipeline.py and examples/finger_pipeline.py rewritten onto
  StreamPipeline + FrameSnapshot: one object, one call per frame, no tuple, and
  no compute backend, queue or stitch setting in sight.
- examples/archive/basic_pipeline_manual.py and _finger_pipeline_manual.py keep
  the previous versions byte-for-byte apart from a supersede header, so code
  copied from them keeps working. The finger header also records the archived
  --show defect (store_true with default=True, so it could never be disabled).
- examples/_display.py holds the shared display helpers, so an example no longer
  hand-rolls depth normalisation and colormap application.
- examples/README.md leads with the recommended pair and documents the manual
  form as still-supported, and states that examples/gui/ is moving to
  orisys-studio.

Tests: three added to tests/test_pipeline.py, covering the reset queue (it must
not run on the caller's thread and must land before the first compute_flow),
image_size_raw, and the None case when a producer reports no size. Verified the
reset test fails when reset() is made inline, so it discriminates.

Verified end-to-end against real media: basic_pipeline on data/sample/s1_480p.mp4
(box) reaches ~113 FPS and exits 0; finger_pipeline on data/dd02-0703/1.mp4
(finger) reaches ~140 FPS with mask coverage 0.41 and exits 0. Both archived
manual versions still run. tests/test_pipeline.py: 20 passed. Full suite:
342 passed, 3 failed - all three failures reproduce on the pristine tree
(import precedence, longrun timing, and a stale ruff version literal in
docs/code-review.md) and are unrelated to this change.
2026-09-30 17:09:02 +08:00
ykcheungab e2ac36269c added ruff code reivew 2026-09-27 19:21:55 +08:00
ykcheungab 36e0c22de6 fix input flag convention mismatch 2026-08-26 20:26:05 +08:00
ykcheungab 68910e63c1 fix finger gui cannot choose camera 2026-08-26 20:19:55 +08:00
ykcheungab 44bcc19426 update docs and downstream sync 2026-08-18 11:00:57 +08:00
ykcheungab 2e09c9360e included low pass filter in package and add to plot_data example 2026-08-17 22:11:17 +08:00
ykcheungab 3117ddd5b9 organize exampels according to products 2026-08-03 15:52:15 +08:00
ykcheungab a9c26fd1fb Merge branch 'feature/finger_docs' into dev 2026-07-14 20:07:43 +08:00
ykcheungab 30f9deb5b2 dd02 setting tune + change Class name from UVUnrollFrameProcessor to FrameUnwarper 2026-07-14 20:00:40 +08:00
zhangyijian 4b38dbb6b6 cleanup example profile code 2026-07-12 19:35:04 +08:00
ykcheungab 2e5c047d1e 1. tuned arrow mesh drawing
2. centralixzed arrow config in layout.py
3. seperate mesh render and display resolution to speed up (~40 fps)
2026-06-19 14:28:28 +08:00
ykcheungab f19f092b64 split example visualizaiton pipeline 2026-06-18 13:47:16 +08:00
ykcheungab fbee1c37ed tuned pipeline to 60 fps 2026-06-14 20:58:46 +08:00
ykcheungab 30bebcd439 integrated finger process pipeline on remapped 2d image 2026-06-14 17:48:30 +08:00