Load real camera calibration from camera_para.dat (ARParam)#41
Draft
kalwalt wants to merge 1 commit into
Draft
Conversation
…ram) Load real camera calibration from an ArtoolkitX camera_para.dat buffer instead of the synthetic 70-degree-FOV defaults: - WebARKitCamera::loadCameraParamFromBuffer: arParamLoadFromBuffer -> arParamChangeSize(w,h) -> fill intrinsic matrix (K = first 3 columns of the calibrated 3x4 mat) and distortion (v4: k1,k2,p1,p2,k3=0; v5: copied direct). - WebARKitTracker::loadCameraParam: refresh m_camMatrix, m_distortionCoeff and the GL projection (m_cameraProjectionMatrix) from the loaded ARParam. Verified end-to-end downstream: the projection changes to the real calibration (fx/fy + non-zero principal-point offset) and tracking is unaffected. Refs: webarkit#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)
Adds optional loading of real camera calibration from an ArtoolkitX
camera_para.dat(ARParam) buffer, instead of the synthetic 70°-FOV defaults.WebARKitCamera::loadCameraParamFromBuffer:arParamLoadFromBuffer→arParamChangeSize(w,h)→ fill K (first 3 cols of the 3×4mat) + distortion(v4: k1,k2,p1,p2,k3=0; v5: copied directly).
WebARKitTracker::loadCameraParam: refreshm_camMatrix,m_distortionCoeffand
m_cameraProjectionMatrixfrom the loadedARParam.Requires the minimal AR param sources to be compiled (done downstream in
webarkit-testing
makem.js:paramFile.c,paramChangeSize.c,ARUtil/log.c).Verified
End-to-end via the webarkit-testing static Teblid example: the projection
switches to the real fx/fy + a non-zero principal-point offset (proof the real
calibration is applied); tracking is unaffected.
Status
Exploratory / draft. Orthogonal to the orientation-handedness issue (#35) —
this improves the lens model but does not fix the mirror. Opening for
record/discussion; may not be merged as-is.
Refs: #35