GARAugmentedFaceSession
ARCore Augmented Face Session.
Class is used to take in a series of CVPixelBufferRef
s and outputs a 3D Face Mesh for the detected face.
Summary
Inheritance
Inherits from:NSObject
Properties
dispatch_queue_t
Public methods
instancetype _Nullable
BOOL
Properties
currentFrame
The most recent frame created from calling updateWithPixelBuffer:timestamp:recognitionRotation:
.
delegate
Delegate that receives callbacks from the face session.
delegateQueue
The dispatch queue through which the face session calls your delegate methods.
Public methods
initWithFieldOfView:error:
- ( instancetype _Nullable ) initWithFieldOfView :( float ) fieldOfViewerror :( NSError ** ) error
Initializes a GARAugmentedFaceSession
with the camera's field of view.
fieldOfView
error
-
GARAugmentedFaceSessionErrorCodeDeviceNotCompatible- this device or OS version is not currently supported.
updateWithPixelBuffer:timestamp:recognitionRotation:
- (BOOL)updateWithPixelBuffer:(CVPixelBufferRef) pixelBuffertimestamp:(NSTimeInterval) timestamprecognitionRotation:(NSUInteger) recognitionRotation
Provides the Face Mesh API with a new pixel buffer so it will capture a face frame.
pixelBuffer
|
CVPixelBufferRef
containing camera image. |
timestamp
|
Timestamp that you wish to associate with this image. Timestamps must monotonically increase on successive calls to this method.
|
recognitionRotation
|
The counter-clockwise rotation in degrees required to orient the face upwards for face detection. NOTE: The default camera orientation is landscape left. When holding the phone in portrait and taking a selfie this should be set to 270. The 270 degree rotation rotates a landscape camera image to portrait with the head pointing up.
|
YES
if the frame was accepted for processing. NO
if the frame was not accepted for processing. This will occur when the session has too many frames in the queue to process.
