Skip to content

feat: add OBB rectangle visualization to 2D Canvas demo v2 - #13

Merged
YoshiRi merged 2 commits into
mainfrom
claude/review-repository-status-1GXDH
May 6, 2026
Merged

feat: add OBB rectangle visualization to 2D Canvas demo v2#13
YoshiRi merged 2 commits into
mainfrom
claude/review-repository-status-1GXDH

Conversation

@YoshiRi

@YoshiRi YoshiRi commented May 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

claude added 2 commits May 6, 2026 04:04
Design spec for adding OBB estimation results to the 2D Canvas demo:
- LocalTracker (Hungarian matching + ExponentialSmoother per track)
- _match_clusters_to_estimates (linear_sum_assignment, gate 6.0m)
- _obb_to_dict JSON schema (cx, cy, theta, l, w, corners)
- Updated frame snapshot schema with clusters + obb fields
- Canvas 8-layer drawing order and legend spec
- 6 test cases for OBB structure validation

https://claude.ai/code/session_013sQREGvTmjgFT8cyRNmPUL
Implements docs/design/rectangle_visualization.md:

- interactive.py:
  - LocalTracker: Hungarian-based frame-to-frame ID management with
    per-track ExponentialSmoother (gate 5.0m, alpha 0.4)
  - _match_clusters_to_estimates(): linear_sum_assignment centroid
    matching with 6.0m gate
  - _obb_to_dict(): OBBResult → JSON-serializable dict (cx, cy, theta,
    l, w, corners)
  - run_once() record_frames=True path now includes clusters and obb
    in each frame snapshot

- demo.html:
  - Cluster-colored point rendering (6-color palette, falls back to
    yellow when no cluster data)
  - drawOBB() draws fitted OBB as orange rectangle using corner coords
  - Updated legend with OBB entry

- test_interactive.py:
  - TestOBBFrameSnapshot with 6 tests covering clusters structure,
    obb key presence, 4-corner constraint, positive dimensions,
    centre proximity, and missed-frame null guarantee

https://claude.ai/code/session_013sQREGvTmjgFT8cyRNmPUL
@YoshiRi
YoshiRi merged commit f06490a into main May 6, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants