Skip to content

Commit dce1ae7

Browse files
committed
Enable face-driven auto focus
This uses on-device vision functions to prioritize faces (up to 10) when auto focusing. It's helpful when subjects are moving around the frame.
1 parent 5ef5972 commit dce1ae7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

SnapSafe/Screens/Camera/Services/CameraDeviceService.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,14 @@ final class CameraDeviceService: ObservableObject, @preconcurrency CameraDeviceP
101101
if device.isFocusModeSupported(.continuousAutoFocus) {
102102
device.focusMode = .continuousAutoFocus
103103
device.isSmoothAutoFocusEnabled = true
104-
104+
105105
if device.isAutoFocusRangeRestrictionSupported {
106106
device.autoFocusRangeRestriction = .none
107107
}
108108
}
109+
110+
// Enable face-driven autofocus (prioritizes detected faces)
111+
device.automaticallyAdjustsFaceDrivenAutoFocusEnabled = true
109112

110113
if device.isExposureModeSupported(.continuousAutoExposure) {
111114
device.exposureMode = .continuousAutoExposure

0 commit comments

Comments
 (0)