title: What is the real Focal Length of the camera used in RealityKit?
body: <p>I am doing this Augmented Reality project starting from Xcode's default AR project.</p>
  <p>I need to know the focal length of the camera used by ARKit.</p>
  <p><a href="https://www.nikonusa.com/en/learn-and-explore/a/tips-and-techniques/understanding-focal-length.html" rel="nofollow noreferrer">This page</a> defines Focal Length well:</p>
  <blockquote>
  <p>Focal length, usually represented in millimeters (mm), is the basic
  description of a photographic lens. It is not a measurement of the
  actual length of a lens, but a calculation of an optical distance from
  the point where light rays converge to form a sharp image of an object
  to the digital sensor or 35mm film at the focal plane in the camera.
  The focal length of a lens is determined when the lens is focused at
  infinity.</p>
  </blockquote>
  <p>Said that, Apple offers this camera matrix called intrinsics, defined as</p>
  <p><a href="https://i.stack.imgur.com/2qb6r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2qb6r.png" alt="enter image description here" /></a></p>
  <p>According to Apple,</p>
  <blockquote>
  <p>The values fx and fy are the pixel focal length, and are identical for
  square pixels. The values ox and oy are the offsets of the principal
  point from the top-left corner of the image frame. All values are
  expressed in pixels.</p>
  </blockquote>
  <p>I am getting the same number for <code>fx</code> and <code>fy</code>, that is <code>1515.481</code>.</p>
  <p>To obtain the real focal length in millimeters,</p>
  <ol>
  <li><a href="https://support.geocue.com/converting-focal-length-from-pixels-to-millimeters-to-use-in-bentley-context-capture/" rel="nofollow noreferrer">This page</a> says I need to use this formula: <code>F(mm) = F(pixels) * SensorWidth(mm) / ImageWidth (pixel)</code> but I don't have the sensor dimensions.</li>
  <li><a href="https://cs.stackexchange.com/a/86347">this other page</a> says <code>FC = fx/sx = fy/sy</code>, where <code>sx</code> and <code>sy</code> are the image dimensions width and height, what I suppose will give me two numbers, because <code>fx</code> = <code>fy</code>... and this is back to square zero.</li>
  </ol>
  <p>On iPhone 11, ARCamera captures a frame with the following dimensions: 1920x1440, at least this number is reported by the property <code>camera.imageResolution</code>.</p>
  <p>In the name of mental sanity, is there a way to get the focal length of <code>ARCamera</code> used by <code>RealityKit</code>?</p>