CidaasFaceEmotion 17.8.2

CidaasFaceEmotion 17.8.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Aug 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by [Cidaas].



  • By
  • Cidaas

More about Cidaas

To know more about Cidaas visit CIDaaS

Cidaas Documentation

https://docs.cidaas.de/

Requirements

Operating System : iOS 9.0 or above Xcode : 8 Swift : 3.0

Installation

CidaasFaceEmotion is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'CidaasFaceEmotion'

Getting started

The following steps are to be followed to use this CidaasFaceEmotion

  1. Create an instance of CidaasFaceMotion
var cidaas_face_motion : CidaasFaceEmotion?
  1. Create an instance of NotificationCenter
let notificationCenter : NotificationCenter = NotificationCenter.default
  1. Initialise the CidaasFaceMotion
cidaas_face_motion = CidaasFaceEmotion(cameraPosition: CidaasFaceEmotion.CameraDevice.faceTimeCamera, optimizeFor: CidaasFaceEmotion.DetectorAccuracy.higherPerformance) 
  1. Start the face detection
cidaas_face_motion!.beginFaceDetection()
  1. Open a front facing camera using CidaasFaceMotion
let cameraView = cidaas_face_motion!.CameraView
self.view.addSubview(cameraView)
  1. Receive the notification
NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "FaceDetectedNotification"), object: nil, queue: OperationQueue.main, using: { notification in
    if self.cidaas_face_motion?.isWinking == true {
        print ("You are blinking")
    }
    else {
        print ("You are not blinking")
    }
})

Help and Support

For more support visit CIDaaS Support