Skip to content

Pick up tracking-loss fix: declare 'not found' when marker leaves frame#39

Open
kalwalt wants to merge 1 commit into
devfrom
fix/tracking-loss-46
Open

Pick up tracking-loss fix: declare 'not found' when marker leaves frame#39
kalwalt wants to merge 1 commit into
devfrom
fix/tracking-loss-46

Conversation

@kalwalt

@kalwalt kalwalt commented Jun 13, 2026

Copy link
Copy Markdown
Member

Summary

Integrates the WebARKitLib tracking-loss fix (webarkit/WebARKitLib#47, fixes webarkit/WebARKitLib#46): the tracker now reports not found when the marker leaves the camera frame, instead of staying stuck on a stale "Marker tracked" pose.

Depends on webarkit/WebARKitLib#47 — bundled here via the submodule bump + rebuilt build/ and dist/.

What's included

  • Submodule bump of emscripten/WebARKitLib to the tracking-loss fix.
  • Rebuilt build/webarkit_ES6_wasm.js, build/webarkit_ES6_wasm.simd.js, dist/WebARKit.js.
  • docs/design-tracking-loss-fix.md — design + decision log + the ArtoolkitX comparison that pinpointed the bug.

The fix (in WebARKitLib#47)

Two coupled changes: run the optical-flow/template-match path on _isDetected || _isTracking (so loss is re-evaluated while tracking, not only on a fresh detection), and reset _valid on template-match failure (the leak that kept isValid() true). Matches ArtoolkitX OCVT semantics (IsTrackableVisible = _isDetected || _isTracking, no lingering valid flag).

Testing

Verified on the webcam Teblid example (threejs_teblid_webcam_ES6_example.html): acquire the marker → AR content shown; remove it → content hides and status shows "Searching…" within ~1–2 frames; re-introduce → re-acquires. No flicker while the marker is held in view.

Review checklist

  • Build artifacts match the bumped submodule source
  • No regression: marker held in view stays tracked (no false "lost" flicker)
  • .vscode/settings.json intentionally excluded

Related

Refs #36, webarkit/WebARKitLib#46

🤖 Generated with Claude Code

Pick up the tracking-loss fix (webarkit/WebARKitLib#47, #46): the tracker now declares 'not found' when the marker leaves the frame instead of staying stuck on a stale pose. Rebuild build/ + dist/ and bump the submodule. Adds the design doc.

Verified with the webcam Teblid example: removing the marker hides the AR content and shows 'Searching...'; no flicker while the marker is held.

Refs #36, webarkit/WebARKitLib#46, webarkit/WebARKitLib#47

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kalwalt kalwalt self-assigned this Jun 13, 2026
@kalwalt kalwalt added bug Something isn't working enhancement New feature or request Emscripten / C / C++ all about Emscripten labels Jun 13, 2026
@kalwalt kalwalt moved this from In progress to Review in progress in New markerless image tracking Jun 13, 2026
@kalwalt kalwalt added this to the Markerless tracking milestone Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Emscripten / C / C++ all about Emscripten enhancement New feature or request

Projects

Status: Review in progress

Development

Successfully merging this pull request may close these issues.

1 participant