PhotogrammetrySample.camera always nil

Hi! I'm having issues retrieving the intrinsics matrix of camera poses for photogrammetry sessions. The camera object always seems to be nil, no matter what dataset I use. From the documentation, I can't see any indication of this issue, is there something I need to do on the code side? Or it's something related to the photo dataset?

I'm on MacOS 15.2

Answered by Engineer in 820435022

The camera property of PhotogrammetrySample, which includes the intrinsic and transform, are only loaded if they are saved in the HEIC, which is currently only done by the ObjectCaptureSession capture front-end. If you are using other capture approaches, such as Camera app or your own capture code, these will not be saved in the file, so cannot be loaded.

What was used to capture these datasets? If it was ObjectCaptureSession then the camera should be there -- if not please file Feedback Assistant!

Accepted Answer

The camera property of PhotogrammetrySample, which includes the intrinsic and transform, are only loaded if they are saved in the HEIC, which is currently only done by the ObjectCaptureSession capture front-end. If you are using other capture approaches, such as Camera app or your own capture code, these will not be saved in the file, so cannot be loaded.

What was used to capture these datasets? If it was ObjectCaptureSession then the camera should be there -- if not please file Feedback Assistant!

Thanks! That's what I thought. No, my project is a plugin for Blender for photogrammetry on macOS, the plugin is generic, people can use photos from various cameras so no ObjectCaptureSession involved, at least not necessary. I needed that matrix to add other functionalities to the system.

There's no other way to get camera intrinsics matrix used by the object capture APIs for the 3D reconstruction?

We currently do not surface the internally computed intrinsics matrices generated by the PhotogrammetrySession reconstruction algorithms. That said, the current API does surface the computed camera poses (extrinsics), via: https://developer.apple.com/documentation/realitykit/photogrammetrysession/poses These transforms are computed for all images possible, even those from arbitrary sources without pose saved into the file.

If you'd like us to consider adding the necessary functionality to additionally surface computed intrinsics, please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Thanks again for the fast response, done.

FB16271889

PhotogrammetrySample.camera always nil
 
 
Q