Skip to content

An iOS and iPadOS app that uses the camera to detect faces in real-time and automatically adjusts focus for better capture using Apple’s AVFoundation and Vision frameworks.

License

Notifications You must be signed in to change notification settings

mgrossu/autofocus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AutoFocus

A simple app that uses the iPhone or iPad camera to detect faces and automatically focus on them.

Implementation

This app leverages Apple’s AVFoundation and Vision frameworks. It uses AVFoundation to access the default (main) camera through the AVCaptureSession() class, which manages multiple input sources (such as microphones or cameras) and outputs.

On startup, the app requests permission to use the camera. Note: camera permission management is not fully implemented, so if the user denies access, the app may crash.

The live camera feed is displayed on the screen using AVCaptureVideoPreviewLayer(). Each captured frame is processed using the Vision framework, which provides built-in face detection algorithms. When a face is detected, the app adjusts the camera focus accordingly.

About

An iOS and iPadOS app that uses the camera to detect faces in real-time and automatically adjusts focus for better capture using Apple’s AVFoundation and Vision frameworks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages