GARAugmentedFaceFrame Class

GARAugmentedFaceFrame Class Reference

Overview

Object that holds all relevant information for an Augmented Faces frame during which face detection was run.

Inherits NSObject.

Instance Method Summary

(simd_float4x4) - projectionMatrixForViewportSize:presentationOrientation:mirrored:zNear:zFar:
 A 3D projection matrix that will result in the correct alignment of AR rendered content on top of the captured camera image. More...
 
(CGAffineTransform) - displayTransformForViewportSize:presentationOrientation:mirrored:
 A transform that converts between image coordinates and coordinate space for displaying 2D content on screen that is aligned with the AR rendered content. More...
 

Property Summary

GARAugmentedFaceface
 Contains a GARAugmentedFace if a face is detected in this frame, otherwise nil. More...
 
CVPixelBufferRef capturedImage
 A buffer containing the image that was input to GARAugmentedFaceSession. More...
 
NSTimeInterval timestamp
 The time at which the frame was captured. More...
 

Method Detail

- (simd_float4x4) projectionMatrixForViewportSize: (CGSize)  viewPortSize
presentationOrientation: (UIDeviceOrientation)  presentationOrientation
mirrored: (BOOL)  mirrored
zNear: (CGFloat)  zNear
zFar: (CGFloat)  zFar 

A 3D projection matrix that will result in the correct alignment of AR rendered content on top of the captured camera image.

Parameters
viewPortSizeThe size of the view into which the AR content will be rendered.
presentationOrientationThe orientation in which to display the AR content. UIDeviceOrientationUnknown, UIDeviceOrientationFaceUp and UIDeviceOrientationFaceDown map to UIDeviceOrientationPortrait.
mirroredWhether to provide a mirrored projection matrix. This will require you to flip the winding order for rendering.
zNearThe near clipping distance in meters.
zFarThe far clipping distance in meters. Must be positive and greater than the near distance.
Remarks
This method assumes camera images are rendered to aspect fill, not aspect fit.
- (CGAffineTransform) displayTransformForViewportSize: (CGSize)  viewPortSize
presentationOrientation: (UIDeviceOrientation)  presentationOrientation
mirrored: (BOOL)  mirrored 

A transform that converts between image coordinates and coordinate space for displaying 2D content on screen that is aligned with the AR rendered content.

Parameters
viewPortSizeThe size of the view used to render the camera image.
presentationOrientationThe orientation in which to display the 2D content. UIDeviceOrientationUnknown, UIDeviceOrientationFaceUp and UIDeviceOrientationFaceDown map to UIDeviceOrientationPortrait.
mirroredWhether to provide a mirrored transform. Use this in conjunction with the value passed in projectionMatrixForViewportSize:presentationOrientation:mirrored:zNear:zFar:
Remarks
This method assumes camera images are rendered to aspect fill, not aspect fit.

Property Detail

- (GARAugmentedFace*) face
readnonatomicassign

Contains a GARAugmentedFace if a face is detected in this frame, otherwise nil.

- (CVPixelBufferRef) capturedImage
readnonatomicassign

A buffer containing the image that was input to GARAugmentedFaceSession.

- (NSTimeInterval) timestamp
readnonatomicassign

The time at which the frame was captured.

This is simply the timestamp passed into updateWithPixelBuffer:timestamp:recognitionRotation: (GARAugmentedFaceSession)

Send feedback about...