robert
robert

Reputation: 3615

setExposureModeCustom: Duration/ISO values in EXIF data do not match

I'm working on an app that uses various advanced iOS camera controls, e.g. custom exposure settings (duration and ISO). The exposure is locked at custom values using:

device.setExposureModeCustom(duration: duration, iso: iso) {
    (timestamp:CMTime) -> Void in
    // ...
}

My app is also locking the device gains corresponding to a specific temperature/tint combination.

Everything seemed to work so far. However, when I open the resulting photo files (JPGs in my case) and look at the exposure duration/ISO values that are stored in the EXIF tags, I notice that there are huge differences between the values that I have specified programmatically and the values that are in the EXIF tags.

I have tested this with various different exposure duration/ISO combinations. As you can see, in most cases, the error is quite large:

Testing various exposure duration/ISO settings and comparing them with the EXIF data.

Why is that? Can anyone reproduce/confirm this issue? It seems like a bug on Apple's part.

Photos are captured using AVCapturePhotoOutput's capturePhoto method:

self.photoOutput.capturePhoto(with: photoSettings, delegate: captureProcessor)

Yes, I double and triple-checked that the exposure mode is set to .custom before taking any photos. The code configuring the AVCaptureDevice is working properly. You can also see that it is working in the preview, for example, using larger exposure durations or larger ISO values results in a brighter image, as you would expect.

Possibly related:


My device: iPad Pro (10.5"), iOS 13.2.2

Upvotes: 4

Views: 888

Answers (1)

I have experienced the same problem. Make sure the isAutoStillImageStabilizationEnabled property is set to false:

let photoSettings: AVCapturePhotoSettings

if self.photoOutput.availablePhotoCodecTypes.contains(.hevc) {
    photoSettings = AVCapturePhotoSettings(format: [AVVideoCodecKey:  AVVideoCodecType.hevc])
} else {
    photoSettings = AVCapturePhotoSettings()
}

photoSettings.isAutoStillImageStabilizationEnabled = false
self.photoOutput.capturePhoto(with: photoSettings, delegate: captureProcessor)

Upvotes: 0

Related Questions