Access ARKit's camera lens settings (AR with custom lenses)?

361 Views Asked by At

I'm researching whether it's fairly trivial to use custom lenses (like Moment wide lens) with ARKit. For that, I'd need to configure ARKit to use custom camera intrinsics for the specific lens. So far, I haven't found anything that suggests it's possible (neither ARCamera not ARSession provide interfaces for that). Is it safe to assume it's impossible with the current ARKit version?

1

There are 1 best solutions below

3
swiftlearneer On

In ARKit, you can directly access the intrinsic of the ARCamera:

 func session(_ session: ARSession, didUpdate frame: ARFrame) {
          guard let arCamera = session.currentFrame?.camera else { return }
       //intrinsics: a matrix that converts between the 2D camera plane and 3D world coordinate space.
        print("ARCamera Intrinsics = \(arCamera.intrinsics)")

    }