"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Camera ModelView Matrix

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,

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: 

DanaScully

Thu, 10/18/2018 - 09:42

In reply to by medabit

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?

medabit

Fri, 10/19/2018 - 22:23

In reply to by DanaScully

Hello,

The DigitalEyewearController API is general purpose. It works in mono and stereo.

Thanks,

Vuforia Engine Support

medabit

Tue, 11/06/2018 - 17:58

In reply to by DanaScully

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