Skip to content

Static-image Teblid AR example (#30) + WebARKitLib pose/localization fixes - #35

Merged
kalwalt merged 4 commits into
devfrom
fix/pose-drd-convention
Jun 10, 2026
Merged

Static-image Teblid AR example (#30) + WebARKitLib pose/localization fixes#35
kalwalt merged 4 commits into
devfrom
fix/pose-drd-convention

Conversation

@kalwalt

@kalwalt kalwalt commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

Completes the static-image Teblid AR example (#30) and picks up the WebARKitLib fixes that make it render correctly. The example tracks the pinball marker in a still image (data/pinball-demo.jpg) and renders a cube + axes correctly localized and oriented on the marker.

Depends on webarkit/WebARKitLib#45 (bundled here via the submodule bump + rebuilt build/ and dist/).

What's included

  • examples/threejs_teblid_static_image_ES6_example.html + examples/threejs_static_image_worker_ES6.js — the static-image example (cube + axes attached directly to the tracked root; no example-side pose correction).
  • Submodule bump of emscripten/WebARKitLib to the pose/localization fixes.
  • Rebuilt build/webarkit_ES6_wasm.js, build/webarkit_ES6_wasm.simd.js, dist/WebARKit.js.
  • docs/design-projection-and-pose-artoolkitx-alignment.md — rewritten with the actual root cause and the diagnostic method (the older DRD-only / GrayScale theories are demoted to a clearly-marked history section).

The fixes (in WebARKitLib#45)

Three orthogonal bugs presented as one "mirror":

  1. keypoint scale-factor double-application (Feature keypoints double-scaled for frames larger than featureImageMinSize (marker mis-localized at ~2x position) WebARKitLib#43) — marker localized at 2x position on frames >640x480 (root cause)
  2. projection X-focal sign (Asymmetric -2*f_x/screenWidth in cameraProjectionMatrix — origin of X-mirror unclear WebARKitLib#35) — screen-X mirror
  3. marker-frame handedness / DRD (Restore CV->GL column negation in updateTrackable (D*R*D) to fix 3D pose orientation WebARKitLib#42) — Z now toward the viewer

Follow-up perf work: webarkit/WebARKitLib#44.

Testing

Manual/visual on the static-image example (2000x1500): debug overlay confirmed the detected marker quad sits tightly on the pinball panel; cube + axes anchor at the marker origin, right-handed (red→right, green→up, blue→toward viewer). Diagnostics were removed after verification.

Review checklist

  • Build artifacts match the bumped submodule source
  • Example loads data/pinball.jpg (marker) + data/pinball-demo.jpg (scene) correctly
  • No leftover debug scaffolding in the example

Closes #30

🤖 Generated with Claude Code

kalwalt and others added 3 commits June 9, 2026 20:19
Pick up the WebARKitLib fixes and rebuild the WASM/dist artifacts: scale-factor double-application (webarkit/WebARKitLib#43), projection X-sign and D*R*D marker-frame handedness (webarkit/WebARKitLib#35, webarkit/WebARKitLib#42). The static-image example now tracks the pinball marker with content correctly localized on the marker and right-side-up (X=right, Y=up, Z=toward viewer), no example-side pose correction.

- bump emscripten/WebARKitLib submodule (9eb49d9, 3a9c58a)

- rebuild build/webarkit_ES6_wasm.js, .simd.js, dist/WebARKit.js

- examples/threejs_static_image_worker_ES6.js: drop debug scaffolding; attach cube + axes directly to the tracked root

Refs #30

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rewrite the design doc's resolution: the static-image AR bug was three orthogonal issues, headlined by the keypoint scale-factor double-application (webarkit/WebARKitLib#43), plus the projection X-sign (#35) and D*R*D marker-frame handedness (#42). Documents the diagnostic method (MATCH-centroid log, getCorners debug overlay, pose-log NDC math) and the final verified state. Demotes the superseded hypotheses (projection-only #35 plan, GrayScale Y-flip theory, example-side correction) to a clearly-marked history section.

Refs #30, webarkit/WebARKitLib#35, webarkit/WebARKitLib#42, webarkit/WebARKitLib#43

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pick up webarkit/WebARKitLib refactor fb78f85 (remove vestigial downsample/scale machinery; no behavior change) and rebuild build/ + dist/.

Refs #30, webarkit/WebARKitLib#43, webarkit/WebARKitLib#44

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
webarkit/WebARKitLib#45 merged into dev (rebased to 1021616, f448ef3, c1ae096). Re-point the submodule from the fork branch commit to the canonical dev tip. Source is identical, so build/ and dist/ are unchanged.

Refs #30, webarkit/WebARKitLib#45

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kalwalt
kalwalt merged commit 13de41e into dev Jun 10, 2026
kalwalt added a commit that referenced this pull request Jun 10, 2026
Rewrite the design doc's resolution: the static-image AR bug was three orthogonal issues, headlined by the keypoint scale-factor double-application (webarkit/WebARKitLib#43), plus the projection X-sign (#35) and D*R*D marker-frame handedness (#42). Documents the diagnostic method (MATCH-centroid log, getCorners debug overlay, pose-log NDC math) and the final verified state. Demotes the superseded hypotheses (projection-only #35 plan, GrayScale Y-flip theory, example-side correction) to a clearly-marked history section.

Refs #30, webarkit/WebARKitLib#35, webarkit/WebARKitLib#42, webarkit/WebARKitLib#43

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this from Review in progress to Done in New markerless image tracking Jun 10, 2026
@kalwalt
kalwalt deleted the fix/pose-drd-convention branch June 15, 2026 22:06
kalwalt added a commit that referenced this pull request Jun 21, 2026
Rewrite the design doc's resolution: the static-image AR bug was three orthogonal issues, headlined by the keypoint scale-factor double-application (webarkit/WebARKitLib#43), plus the projection X-sign (#35) and D*R*D marker-frame handedness (#42). Documents the diagnostic method (MATCH-centroid log, getCorners debug overlay, pose-log NDC math) and the final verified state. Demotes the superseded hypotheses (projection-only #35 plan, GrayScale Y-flip theory, example-side correction) to a clearly-marked history section.

Refs #30, webarkit/WebARKitLib#35, webarkit/WebARKitLib#42, webarkit/WebARKitLib#43

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation Emscripten / C / C++ all about Emscripten enhancement New feature or request examples javascript

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant