Is it attainable to get the digital camera intrinsic matrix for a captured single picture on iOS?
I do know that one can get the cameraCalibrationData
from a AVCapturePhoto
, which additionally incorporates the intrinsicMatrix
. Nevertheless, that is solely supplied when utilizing a constituent (i.e. multi-camera) seize gadget and setting virtualDeviceConstituentPhotoDeliveryEnabledDevices
to a number of gadgets (or enabling isDualCameraDualPhotoDeliveryEnabled
on older iOS variations). Then photoOutput(_:didFinishProcessingPhoto:)
known as a number of occasions, delivering one picture for every digital camera specified. These then include the calibration information.
So far as I do know, there is no such thing as a method to get the calibration information for a traditional, single-camera picture seize.
I additionally discovered that one can set isCameraIntrinsicMatrixDeliveryEnabled
on a seize connection that results in a AVCaptureVideoDataOutput
. The buffers that arrive on the delegate of that output then include the intrinsic matrix by way of the kCMSampleBufferAttachmentKey_CameraIntrinsicMatrix
metadata. Nevertheless, this requires including one other output to the seize session, which feels fairly wasteful only for getting this piece of metadata. Additionally, I might someway want to determine which buffer was briefly closest to when the precise picture was taken.
Is there a greater, easier manner for getting the digital camera intrinsic matrix for a single picture seize?
If not, is there a method to calculate the matrix primarily based on the picture’s metadata?