[Go to site: main page, start]

Recovering physical viewing-ray geometry from an iPhone Camera panorama

I am a private individual working on a personal panorama viewing and reprojection project. I have been investigating the geometry of panoramas produced by the iPhone Camera app, with extensive analytical and research assistance from OpenAI's ChatGPT.

My goal is to determine the physical viewing direction (longitude and latitude, or equivalently a 3-D viewing ray) corresponding to each pixel in a finished iPhone panorama.

I have been able to recover much of this geometry from information contained in the panorama itself. Controlled tests on several iPhone models indicate that I can accurately determine the effective focal length of the perspective source camera, camera rotation during capture, endpoint geometry, horizontal field of view, and gravity-relative camera orientation.

The remaining problem is the absolute vertical/latitude mapping in the finished panorama.

The gravity/orientation information allows me to determine where a known physical latitude—for example, the true horizontal plane (0° latitude)—falls in the individual source-camera frames. However, I have not found a documented way to determine exactly where those source-frame viewing rays are placed vertically in the final panorama bitmap.

My investigation suggests that the Camera app performs additional geometric processing during panorama assembly, including geometric/perspective correction and the selection, cropping and/or rotation of image slices before they are blended into the panorama. What I have not been able to determine is whether the information needed to reconstruct that source-ray-to-finished-pixel mapping is retained anywhere in the finished panorama or is available through a supported Apple API.

My primary question is therefore:

Is there a documented or supported way to determine the physical viewing ray corresponding to each pixel in a panorama produced by the iPhone Camera app, including its absolute vertical/latitude mapping?

More specifically:

  • Is the projection used for the finished Camera panorama documented?

  • Is the gravity-relative orientation or vertical reference of that projection available through supported metadata or an API?

  • Is sufficient information retained in the panorama to reconstruct the geometric correction and placement applied to source images/slices during panorama assembly?

  • If that information is not retained in the finished image, is there another supported framework or API that provides it during or after panorama capture?

I am not trying to reproduce Apple's image blending or other proprietary image-processing algorithms. I simply want to interpret the geometry of the finished image accurately enough to reproject it—for example, to cylindrical or equirectangular coordinates—and assign physical longitude and latitude to its pixels.

I have controlled test panoramas from multiple iPhone generations and considerably more technical detail about the investigation. I would be happy to provide example files, measurements, or additional information if that would be helpful.

Even confirmation that the required vertical-placement information is not retained or exposed would be very useful.

Answered by DTS Engineer in 908028022

Thanks for the carefully scoped question. I can't confirm what the Camera app keeps internally when it assembles a panorama, but I can tell you what's documented, and none of it describes the geometry you're after.

Photos identifies a panorama with PHAssetMediaSubtype.photoPanorama, which is documented as "The asset is a large-format panorama photo." I'm not aware of any documented API or metadata that describes a Camera panorama's projection, its horizon or vertical placement, or a gravity-relative reference. The iOS 27 SDK also has no public API for capturing panoramas. ImageIO exposes Apple camera metadata as kCGImagePropertyMakerAppleDictionary, but its contents aren't documented.

If documented panorama geometry would help your project, please file an enhancement request using the Feedback Assistant so that your request can be seen by the appropriate decision makers. If you file the request, please post the Feedback number here so we can make sure it gets routed to the right team.

Please note that filing an enhancement request does not guarantee Apple will add any requested functionality to Apple products in the future. However, with that said, filing an enhancement request is a good way to get your ideas in front of the folks who make decisions about that sort of thing.

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

Accepted Answer

Thanks for the carefully scoped question. I can't confirm what the Camera app keeps internally when it assembles a panorama, but I can tell you what's documented, and none of it describes the geometry you're after.

Photos identifies a panorama with PHAssetMediaSubtype.photoPanorama, which is documented as "The asset is a large-format panorama photo." I'm not aware of any documented API or metadata that describes a Camera panorama's projection, its horizon or vertical placement, or a gravity-relative reference. The iOS 27 SDK also has no public API for capturing panoramas. ImageIO exposes Apple camera metadata as kCGImagePropertyMakerAppleDictionary, but its contents aren't documented.

If documented panorama geometry would help your project, please file an enhancement request using the Feedback Assistant so that your request can be seen by the appropriate decision makers. If you file the request, please post the Feedback number here so we can make sure it gets routed to the right team.

Please note that filing an enhancement request does not guarantee Apple will add any requested functionality to Apple products in the future. However, with that said, filing an enhancement request is a good way to get your ideas in front of the folks who make decisions about that sort of thing.

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

Thank you very much for the helpful response. This confirms what I had been finding regarding the lack of documented panorama geometry, and I appreciate the suggestion to file an enhancement request. I will do that, although it may be a week or so before I have an opportunity to put the request together carefully. Once I have filed it, I'll post the Feedback number here as you suggested. Thanks again for your help.

Thank you for your response and for suggesting that I submit an enhancement request.

I have now submitted the request through Feedback Assistant:

FB25180862 — Provide Documented Viewing-Ray Geometry Metadata for iPhone Camera Panoramas

The request describes the need for documented pixel-to-viewing-ray geometry, including gravity-referenced vertical orientation and any geometric transformations applied to the finished panorama.

I appreciate your offer to help route this request to the appropriate engineering team. Please let me know if additional technical information or sample panoramas would be useful.

Thanks again for your assistance.

Recovering physical viewing-ray geometry from an iPhone Camera panorama
 
 
Q