Skip to content
 
 

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FaceTracking

An example app with AVFoundation camera support and face features tracking written in Swift 3.0.

Below an example how it works.

Store image on Device

Calling below function will help you to store image on device.

func saveToCamera() {
   if let videoConnection = stillImageOutput.connection(withMediaType: AVMediaTypeVideo) {
        stillImageOutput.captureStillImageAsynchronously(from: videoConnection, completionHandler: { (CMSampleBuffer, Error) in
            if let imageData = AVCaptureStillImageOutput.jpegStillImageNSDataRepresentation(CMSampleBuffer) {
                if let cameraImage = UIImage(data: imageData) {
                        UIImageWriteToSavedPhotosAlbum(cameraImage, nil, nil, nil)
                }
            }
        })
   }
}

If this code was helpful, I would love to hear from you. Twitter : @Pranavan

About

An example app with AVFoundation camera support and face features tracking

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages