Get proper field of view from ARFrame in ARKit

I'm trying to get the proper field of view from ARKit during an AR session.

The sceneview camera does not return the proper field of view, but the ARFrame camera really only returns a projection matrix.

I found a calculation online but the results are different values for x and y. Most 3D application just have a single setting for the camera's field of view.

Does anyone know how to get this *(I'm assuming it changes each frame as the camera focusses?)

Actually it's the Focal length in millimetres that I really want, but the accurate Field of view in degrees for the ARCamera would also do.

It also it doesn't seem I'm getting the correct resolution/aspect for the ARFrame as the ARFrame is cropped and resolution it gives me is for the full image.

Hello,

Please see this other thread which demonstrates how you can get the focal length: https://developer.apple.com/forums/thread/715949?answerId=730011022#730011022

Get proper field of view from ARFrame in ARKit
 
 
Q