We build an iOS app that photographs bookshelves and later guides the user back to a specific book with ARKit (anchors + saved ARWorldMap). The photo is sent to a server for spine detection and OCR, so sharpness in dim bookstore light matters a lot. We cannot get a Deep Fusion photo while an ARSession is running, and after weeks of testing we believe it is not supported at all. We would like to know whether that is intended or simply not implemented yet.
Device: iPhone 13 Pro Max, iOS 27.2 (also seen on iOS 27.0). ARWorldTrackingConfiguration, back wide camera, sceneReconstruction = .mesh on LiDAR.
1. captureHighResolutionFrame(using:) with .quality (iOS 26 API)
let settings = configuration.videoFormat.defaultPhotoSettings
settings.photoQualityPrioritization = .quality
session.captureHighResolutionFrame(using: settings) { frame, error in ... }
We ran this on every entry of ARWorldTrackingConfiguration.supportedVideoFormats (22 formats), plus recommendedVideoFormatForHighResolutionFrameCapturing and recommendedVideoFormatFor4KResolution, each time with a fresh session and tracking normal.
.qualityis rejected at the call on every format (Objective-C exception thrown about 1 ms after the call, no frame is delivered)..balancedworks on some formats and gives a 12 MP image, but no fusion.frame.exifDatahas no MakerApple dictionary, so we cannot even check the Apple capture type (tag 0x14) of what ARKit returns.CompositeImageis not set.
2. Exposure of the ARKit high-resolution frame
Same indoor scene: ARKit's frame is shot around 1/100 s, ISO 1250-2000 (the video format runs at 60 fps), while a regular AVCapturePhotoOutput photo is 1/50 s, ISO 500 (1/15 s in a dark room). Text on book spines is clearly worse.
3. Plain AVFoundation on the same phone (no ARKit)
AVCapturePhotoOutput, .quality, AVCaptureVideoDataOutput running at the same time:
4032x3024 @30 (isHighestPhotoQualitySupported) | 20 / 20 photos |
1920x1440 @60 (isHighPhotoQualitySupported), at 60, 30-60 and 30 fps | 0 / 58 photos (0x14 = 1) |
In the "highest" format the video stream keeps running during the capture (longest gap between video frames: 246 ms median, 279 ms max), and press to end of exposure is under 235 ms. LiDAR depth output next to it does not break fusion either. So the hardware can deliver video + a fused photo at the same time, just not inside ARKit.
4. Our current workaround: pause ARKit
At shutter press: snapshot the ARKit pose and getCurrentWorldMap, session.pause(), wait for ARKit's capture session to stop, start our own AVCaptureSession on the same camera (ARKit's format first, then switch to the 4032x3024 format), wait for AE, shoot the Deep Fusion photo, restore the device state, then session.run(configuration, options: []).
It works and the photo matches the system Camera (same EXIF and maker note values), but:
- about 3.5 to 4.5 s per photo (1.1 s to hand the camera over, ~1 s exposure + Deep Fusion, then 1 to 2.3 s for ARKit to relocalize),
- ARKit re-initializes its tracking after the format switch and sometimes never relocalizes with a weak map or low light, so we had to write our own recovery (reset + rigid registration of the old and new worlds).
Other things we checked: configurableCaptureDeviceForPrimaryCamera only lets us change the lens settings, not the active format or the photo pipeline. Letting iOS interrupt the session instead of pausing it never relocalized.
- Is Deep Fusion (
.qualityprioritization) deliberately unavailable incaptureHighResolutionFrame(using:), or is it a missing piece? On the iPhone 13 Pro Max,.qualityis rejected for every ARKit video format. - Could ARKit offer a video format built on the lens's "highest photo quality" device format (4032x3024 @30 on this phone), so that a
.qualitycapture becomes possible while tracking? AVFoundation alone shows that video and a fused photo can run together in that format. - Is there a supported way to tell what ARKit actually captured (capture type, prioritization used), since
exifDatahas no maker note? - If none of this is planned, is pause →
AVCapturePhotoOutput→ resume the recommended pattern, and is there a way to make the resume keep the current world instead of re-initializing tracking?
Happy to share a small sample project, the per-format test results (JSON) and sample photos. A Feedback Assistant report can be filed as well if that helps.
Thanks!
-
The
.qualitypriorization is indeed not available while anARSessionis running. The highest prioritization it supports is.balancedon non-binned video formats. Binned video formats support only.speed. -
The limit is intentional:
.qualityprioritization enables optical image stabilization (OIS), which moves the lens during capture and can degrade world tracking. If your use case needs a different trade-off, please file a request in Feedback Assistant. -
The high-resolution frame uses the prioritization in the photo settings you pass; there isn't explicit API that reports it.
-
Pausing the session, capturing with
AVCapturePhotoOutput, and resuming is a valid approach. You can use theinitialWorldMapAPI to set to a world map saved before pausing. Save it withgetCurrentWorldMap(completionHandler:), and callpause()only after the completion handler has delivered the map. ARKit relocalizes against that map and restores your anchors, which can replace your own registration step.