Wire camera_para.dat loading (real camera calibration)#34
Draft
kalwalt wants to merge 1 commit into
Draft
Conversation
End-to-end real-camera-calibration loading for the static example: - tools/makem.js: compile the minimal AR param files (paramFile.c, paramChangeSize.c, ARUtil/log.c) needed by arParamLoadFromBuffer. - emscripten/WebARKitJS + bindings: expose WebARKit::loadCameraParam(bytes). - src/WebARKitController.js: loadCameraParam(buffer) wrapper. - examples/worker_threejs.js: optional loadCameraParam from the initTracker message (guarded; no effect on other examples). - examples/threejs_static_image_worker_ES6.js: fetch data/camera_para.dat and pass it; also still contains in-progress orientation work (found() Y-row + Z-column correction, markerFrame, debug cube/axes) -- WIP. - examples/data/camera_para.dat: sample calibration. - Bump emscripten/WebARKitLib submodule to the loadCameraParamFromBuffer commit. - Rebuilt build/ + dist/ artifacts. Exploratory: validates the calibration path end-to-end (projection switches to the real fx/fy + non-zero principal point). Orthogonal to the orientation / handedness issue (WebARKitLib#35) and does not resolve it on its own. Refs: webarkit/WebARKitLib#35 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.
Summary (DRAFT / exploratory)
End-to-end wiring to load real camera calibration from
camera_para.datintothe static Teblid example. Depends on webarkit/WebARKitLib#41.
tools/makem.js: compile the minimal AR param sources (paramFile.c,paramChangeSize.c,ARUtil/log.c) needed byarParamLoadFromBuffer.emscripten/WebARKitJS+bindings.cpp: exposeWebARKit::loadCameraParam(bytes).src/WebARKitController.js:loadCameraParam(buffer)wrapper.examples/worker_threejs.js: optionalloadCameraParamfrom theinitTrackermessage (guarded — no effect on other examples).
examples/threejs_static_image_worker_ES6.js: fetchdata/camera_para.datand pass it.
examples/data/camera_para.dat: sample calibration; rebuiltbuild/+dist/;submodule bumped.
Verified
Console shows
loadCameraParam: real camera_para.dat loaded, the projectionswitches to the real fx/fy + non-zero principal-point offset, and tracking is
unaffected (cube still renders).
Status & caveats
improves the lens model but does not fix the mirror, so likely not merged as-is.
found()Y-row + Z-column correction,markerFrame, and debug cube/axes).first for the pointer to resolve on canonical.
Refs: webarkit/WebARKitLib#35, webarkit/WebARKitLib#41