artoolkitx / arunityx

artoolkitX for Unity, providing high-performance video acquisition, marker and texture tracking and full Unity Editor support
https://www.artoolkitx.org/
Other
41 stars 22 forks source link

Custom Camera Calibration #101

Open FaithGriffin opened 5 months ago

FaithGriffin commented 5 months ago

Hello, I am trying to calibrate my app to a projector. I saw https://github.com/artoolkitx/artoolkitx-calibration and I think this will be a tool that I might use to map our projected surface to the rendered objects by ARToolkitx. Is there a way to add the camera_para.dat to ARUnityX?

philip-lamb commented 5 months ago

Yes, in arunityX you can specify camera parameters from a file by placing it in StreamingAssets and setting the name on the ARXController component.

image

However camera calibration is really about the incoming image stream, rather than the displayed image stream. In artoolkitX, the same calibration data is used on both sides (to dewarp the camera stream, and to apply warping to the virtual environment to match the warped camera background image stream). If you want to use different output warping, this is possible with code modifications, but not supported out-of-the-box.