Skip to content

feat(#44): skip detection while tracking (part B) + rebuild - #43

Merged
kalwalt merged 2 commits into
devfrom
feat/detection-guard-44b
Jun 19, 2026
Merged

feat(#44): skip detection while tracking (part B) + rebuild#43
kalwalt merged 2 commits into
devfrom
feat/detection-guard-44b

Conversation

@kalwalt

@kalwalt kalwalt commented Jun 19, 2026

Copy link
Copy Markdown
Member

Superproject side of #44 part B. Pairs with the library change in webarkit/WebARKitLib#54.

What

Why

Detection (feature extraction + descriptor matching) is the dominant per-frame cost. Part B skips it entirely while optical flow holds a lock, so only the cheap optical-flow + template path runs in the steady tracking state.

Measured

Teblid webcam example, 640×480:

  • ~10–15 fps detecting every frame (part A baseline) → ~45 fps while tracking (~3×).

Static example, 1920×1440 (pyrLevel 1): still acquires and holds — no freeze.

Testing

Scope

Completes #44 (part A = downsampling in #52/webarkit-testing#42; part B = detection guard here).

🤖 Generated with Claude Code

Bump WebARKitLib to the part-B detection guard (webarkit/WebARKitLib#54)
and rebuild build/ + dist/. Feature detection is now skipped while optical
flow holds a lock, so the steady tracking state is much cheaper.

Measured on the Teblid webcam example (640x480): ~10-15 fps when detecting
every frame -> ~45 fps while tracking. Static example (1920x1440, pyrLevel 1)
still acquires and holds (no freeze).

- docs: add docs/design-detection-guard.md (understanding, ArtoolkitX
  reference, why the guard is on _isTracking rather than the marker counter,
  state walk-through, testing, risks, non-goals).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kalwalt kalwalt self-assigned this Jun 19, 2026
@kalwalt kalwalt added enhancement New feature or request javascript Emscripten / C / C++ all about Emscripten labels Jun 19, 2026
@kalwalt kalwalt added this to the Markerless tracking milestone Jun 19, 2026
@kalwalt kalwalt moved this from To do to Review in progress in New markerless image tracking Jun 19, 2026
Re-point the submodule at the canonical webarkit/WebARKitLib dev tip after
#54 (skip detection while tracking, part B) merged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kalwalt kalwalt moved this from Review in progress to Reviewer approved in New markerless image tracking Jun 19, 2026
@kalwalt
kalwalt merged commit c259c2b into dev Jun 19, 2026
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in New markerless image tracking Jun 19, 2026
kalwalt added a commit that referenced this pull request Jun 21, 2026
…xample

Bump WebARKitLib to the part-A downsampling change (webarkit/WebARKitLib#52)
and rebuild build/ + dist/. Feature detection now runs on a pyrDown'd copy
of the live frame; matched keypoints are rescaled to full-frame coords.

- examples: point the Teblid static-image example at a marker-fills-frame
  1920x1440 demo image (pinball-demo-big.jpg) so HD downsampling is
  exercised (pyrLevel 1, scale 2.0) and the marker still acquires. The old
  pinball-demo.jpg (small marker in a large frame) falls below the detector
  threshold once downsampled.
- docs: add docs/design-detection-downsampling.md (understanding, ArtoolkitX
  reference, decision log, the four edits, testing, risks, non-goals).

Verified: Marker tracked, 1000 matches, content centered (#38) and
right-handed (#42/#46), no #43-style doubling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kalwalt
kalwalt deleted the feat/detection-guard-44b branch July 5, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Emscripten / C / C++ all about Emscripten enhancement New feature or request javascript

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant