By DanaScully
on Thu, 10/11/2018 - 13:04
Hello there!
In my project I need to have access to the camera modelview matrix. I read some threads here but none of them gave a decisive answer.
Is it even possible to have access to the modelView matrix of the camera? And I don't mean the matrix that one can get from Unity camera attached to the ARCamera. It appears that in other SDKs (like c++, java in the following link ) this is possible via the the Tool namespace(https://library.vuforia.com/articles/Solution/Working-with-the-Camera), but not in Unity. If the answer is negative, how can I develop a plugin for Unity that simply returns the parameters I want? Just need a starting point.
Best regards
-Dana Scully
Hello,
Hello,
In general, the modelview matrix is the matrix that transforms from local object space to camera space.
In Unity, you can do this in two steps:
Hello,
Hello,
Thanks for the reply. Sorry but I forgot to mention that currently I am using a webcam. The DigitalEyeWearARController is used for HoloLens and Stereo cam devices. Is the solution in the answer also applicable to the CameraDevice or is it going to be different then?
Hello,
Hello,
The DigitalEyewearController API is general purpose. It works in mono and stereo.
Thanks,
Vuforia Engine Support
Hello,
Hello,
Hello,
Hello,
The model View matrix represents model to camera, i.e. it transforms a 3d point coordinates from the model reference frame to camera reference frame. A simple matrix inversion provides the opposite transformation.
Thanks,
Vuforia Engine Support