feat(#44): skip detection while tracking (part B) + rebuild - #43
Merged
Conversation
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>
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superproject side of #44 part B. Pairs with the library change in webarkit/WebARKitLib#54.
What
build/anddist/artifacts.docs/design-detection-guard.md(understanding, ArtoolkitX reference, why the guard is on_isTrackingrather than the marker counter, state walk-through, testing, risks, non-goals).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:
Static example, 1920×1440 (pyrLevel 1): still acquires and holds — no freeze.
Testing
Marker tracked! Num. matches: 1000, content centered (AR content anchors at the marker's top-left corner, not its center #38), right-handed (feat(#44): detection-side pyramid downsampling (part A) + HD static example #42/chore(#50): dead-code cleanup submodule bump + rebuild + decisions doc #46), no feat(#44): skip detection while tracking (part B) + rebuild #43-style doubling, holds without freezing.[track] marker LOSTon removal →[track] marker FOUNDon re-show (chore(#50): dead-code cleanup submodule bump + rebuild + decisions doc #46 re-acquisition intact); fps jumps from ~10–15 to ~45 once tracking.Scope
Completes #44 (part A = downsampling in #52/webarkit-testing#42; part B = detection guard here).
🤖 Generated with Claude Code