Skip to content

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

Merged
kalwalt merged 2 commits into
devfrom
fix/tracking-loss-46
Jun 15, 2026
Merged

kalwalt merged 2 commits 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
webarkit/WebARKitLib#47 merged into dev (rebased to 39183f0). Re-point the submodule from the fork-branch commit to the canonical dev tip; source is identical, build/ and dist/ unchanged.

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

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 15, 2026
@kalwalt
kalwalt merged commit f6e75f4 into dev Jun 15, 2026
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in New markerless image tracking Jun 15, 2026
@kalwalt
kalwalt deleted the fix/tracking-loss-46 branch June 15, 2026 22:06
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: Done

Development

Successfully merging this pull request may close these issues.

1 participant