AVMetadataFaceObject Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AVFoundation.framework |
| Availability | Available in iOS 6.0 and later. |
| Declared in | AVMetadataObject.h |
Overview
The AVMetadataFaceObject class is a concrete subclass of AVMetadataObject that defines the features of a single detected face. You can retrieve instances of this class from the output of an AVCaptureMetadataOutput object on devices that support face detection.
Tasks
Getting the Face Identifier
-
faceIDproperty
Accessing the Face Detection Data
-
hasRollAngleproperty -
rollAngleproperty -
hasYawAngleproperty -
yawAngleproperty
Properties
faceID
The unique ID for this face metadata object. (read-only)
Discussion
Each time a face enters the picture, it is assigned a new unique identifier, which you can use to reference the face in your code. Face IDs are not reused, and the same face leaving and entering the picture again is assigned a new identifier.
Availability
- Available in iOS 6.0 and later.
Declared In
AVMetadataObject.hhasRollAngle
A Boolean value indicating whether there is a valid roll angle associated with the face. (read-only)
Discussion
If the value of this property is NO, the value in the rollAngle property is invalid and must not be accessed.
Availability
- Available in iOS 6.0 and later.
Declared In
AVMetadataObject.hhasYawAngle
A Boolean value indicating whether there is a valid yaw angle associated with the face. (read-only)
Discussion
If the value of this property is NO, the value in the yawAngle property is invalid and must not be accessed.
Availability
- Available in iOS 6.0 and later.
Declared In
AVMetadataObject.hrollAngle
The roll angle of the face specified in degrees. (read-only)
Discussion
The roll angle represents the side-to-side tilt of the face relative to the metadata’s bounding rectangle. A value of 0.0 yields a face that is level relative to the picture, whereas a value of 90 yields a face that is perpendicular relative to the picture.
You must check the value of the hasRollAngle property before accessing this property. If the value in the hasRollAngle property is NO, reading the value in this property raises an exception.
Availability
- Available in iOS 6.0 and later.
See Also
Declared In
AVMetadataObject.hyawAngle
The yaw angle of the face specified in degrees. (read-only)
Discussion
The yaw angle represents the rotation of the face around the vertical axis. A value of 0.0 yields a face that is looking directly at the camera, whereas a yaw angle of 90 degrees yields a face whose eye line is perpendicular to that of the camera.
You must check the value of the hasYawAngle property before accessing this property. If the value in the hasYawAngle property is NO, reading the value in this property raises an exception.
Availability
- Available in iOS 6.0 and later.
See Also
Declared In
AVMetadataObject.hConstants
Face Metadata Type
A metadata type string for face detection metadata.
NSString *const AVMetadataObjectTypeFace;
Constants
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)