Log in or register to post comments

Getting FOV from Camera

October 1, 2015 - 6:15am #1

I tried posting this in an existing thread but it got sent to some review. I suspect this is not about to be posted any soon so I post it again.

I need to get the FOV of the ARCamera. The value in the editor is obviously wrong and most likely not used by Vuforia.

The set is that the user can take a picture of the screen, this create a background picture and a json file for the value of the camera. I store the position, rotation and projection matrix of it.

In a new scene, a new camera (non AR) is getting all the value from the file and the same model is positioned at origin. The camera points towards it correctly but the model is not scaled properly, it actually gets stretched.   

I tried getting the FOV with this equation:

float fov = Mathf.Atan (1f / cam.projectionMatrix[1,1]) * 2f * Mathf.Rad2Deg;

But then the model is shown right but too small. For instance, the value I get is 31.8 while it should be somewhere around 40.

I cannot just freeze the AR camera since the user is going around in different scene and the data are meant to be sent over a network. 

I just want to create a copy of my AR camera.



Getting FOV from Camera

October 6, 2015 - 8:15pm #2

Thanks for sharing your solution with the community.

Log in or register to post comments