The Mobile Vision API is now a part of ML Kit. We strongly encourage you to try it out, as it comes with new capabilities like on-device image labeling! Also, note that we ultimately plan to wind down the Mobile Vision API, with all new on-device ML capabilities released via ML Kit. Feel free to reach out to Firebase support for help.

GMVFaceFeature Class

GMVFaceFeature Class Reference

Overview

Describes a face detected in a still image frame.

Its properties provide face landmark information.

Inherits GMVFeature.

Public Attributes

NSString *const GMVFeatureTypeFace
 
NSString *const GMVFeatureTypeBarcode
 
NSString *const GMVFeatureTypeTextBlock
 
NSString *const GMVFeatureTypeTextLine
 
NSString *const GMVFeatureTypeTextElement
 

Property Summary

BOOL hasHeadEulerAngleY
 Indicates whether the detector found the head y euler angle. More...
 
CGFloat headEulerAngleY
 Indicates the rotation of the face about the vertical axis of the image. More...
 
BOOL hasHeadEulerAngleZ
 Indicates whether the detector found the head z euler angle. More...
 
CGFloat headEulerAngleZ
 Indicates the rotation of the face about the axis pointing out of the image. More...
 
BOOL hasMouthPosition
 Indicates whether the detector found the face’s mouth corner where the lips meet. More...
 
CGPoint mouthPosition
 The coordinates of the mouth corner where the lips meet, relative to the detected image in the view coordinate system. More...
 
BOOL hasBottomMouthPosition
 Indicates whether the detector found the face's bottom lip center. More...
 
CGPoint bottomMouthPosition
 The coordinates of the bottom lip center, relative to the detected image in the view coordinate system. More...
 
BOOL hasRightMouthPosition
 Indicates whether the detector found the face's right mouth corner. More...
 
CGPoint rightMouthPosition
 The coordinates of the right mouth corner, relative to the detected image in the view coordinate system. More...
 
BOOL hasLeftMouthPosition
 Indicates whether the detector found the face's left mouth corner. More...
 
CGPoint leftMouthPosition
 The coordinates of the left mouth corner, relative to the detected image in the view coordinate system. More...
 
BOOL hasLeftEarPosition
 Indicates whether the detector found the midpoint of the face's left ear tip and left ear lobe. More...
 
CGPoint leftEarPosition
 The coordinates of the midpoint between the face's midpoint of the left ear tip and left ear lobe, relative to the detected image in the view coordinate system. More...
 
BOOL hasRightEarPosition
 Indicates whether the detector found the face's left ear tip. More...
 
CGPoint rightEarPosition
 The coordinates of the midpoint between the face's midpoint of the right ear tip and right ear lobe, relative to the detected image in the view coordinate system. More...
 
BOOL hasLeftEyePosition
 Indicates whether the detector found the face’s left eye. More...
 
CGPoint leftEyePosition
 The coordinates of the left eye, relative to the detected image in the view coordinate system. More...
 
BOOL hasRightEyePosition
 Indicates whether the detector found the face’s right eye. More...
 
CGPoint rightEyePosition
 The coordinates of the right eye, relative to the detected image in the view coordinate system. More...
 
BOOL hasLeftCheekPosition
 Indicates whether the detector found the face's left cheek. More...
 
CGPoint leftCheekPosition
 The coordinates of the left cheek, relative to the detected image in the view coordinate system. More...
 
BOOL hasRightCheekPosition
 Indicates whether the detector found the face's right cheek. More...
 
CGPoint rightCheekPosition
 The coordinates of the right cheek, relative to the detected image in the view coordinate system. More...
 
BOOL hasNoseBasePosition
 Indicates whether the detector found the midpoint between the face's nostrils where the nose meets the face. More...
 
CGPoint noseBasePosition
 The coordinates of the midpoint between the nostrils, relative to the detected image in the view coordinate system. More...
 
BOOL hasSmilingProbability
 Indicates whether a smiling probability is available. More...
 
CGFloat smilingProbability
 A value between 0.0 and 1.0 giving a probability that the face is smiling. More...
 
BOOL hasLeftEyeOpenProbability
 Indicates whether a left eye open probability is available. More...
 
CGFloat leftEyeOpenProbability
 A value between 0.0 and 1.0 giving a probability that the face's left eye is open. More...
 
BOOL hasRightEyeOpenProbability
 Indicates whether a right eye open probability is available. More...
 
CGFloat rightEyeOpenProbability
 A value between 0.0 and 1.0 giving a probability that the face's right eye is open. More...
 
CGRect bounds
 The rectangle that holds the discovered feature relative to the detected image in the view coordinate system. More...
 
NSString * type
 The type of feature that was discovered. More...
 
BOOL hasTrackingID
 Indicates whether the object has a tracking ID. More...
 
NSUInteger trackingID
 The tracking identifier of the feature. More...
 

Member Data Documentation

- (NSString* const) GMVFeatureTypeFace
inherited

The discovered feature is a person’s face. Use the GMVFaceFeature class to get more information about the detected feature.

- (NSString* const) GMVFeatureTypeBarcode
inherited

The discovered feature is a barcode. Use the GMVBarcodeFeature class to get more information about the detected feature.

- (NSString* const) GMVFeatureTypeTextBlock
inherited

The discovered feature is a text block. Use the GMVTextBlockFeature class to get more information about the detected feature.

- (NSString* const) GMVFeatureTypeTextLine
inherited

The discovered feature is a text line. Use the GMVTextLineFeature class to get more information about the detected feature.

- (NSString* const) GMVFeatureTypeTextElement
inherited

The discovered feature is a text element. Use the GMVTextElementFeature class to get more information about the detected feature.

Property Detail

- (BOOL) hasHeadEulerAngleY
readatomicassign

Indicates whether the detector found the head y euler angle.

- (CGFloat) headEulerAngleY
readatomicassign

Indicates the rotation of the face about the vertical axis of the image.

Positive euler y is when the face is turned towards the right side of the image that is being processed.

- (BOOL) hasHeadEulerAngleZ
readatomicassign

Indicates whether the detector found the head z euler angle.

- (CGFloat) headEulerAngleZ
readatomicassign

Indicates the rotation of the face about the axis pointing out of the image.

Positive euler z is a counter-clockwise rotation within the image plane.

- (BOOL) hasMouthPosition
readatomicassign

Indicates whether the detector found the face’s mouth corner where the lips meet.

- (CGPoint) mouthPosition
readatomicassign

The coordinates of the mouth corner where the lips meet, relative to the detected image in the view coordinate system.

- (BOOL) hasBottomMouthPosition
readatomicassign

Indicates whether the detector found the face's bottom lip center.

- (CGPoint) bottomMouthPosition
readatomicassign

The coordinates of the bottom lip center, relative to the detected image in the view coordinate system.

- (BOOL) hasRightMouthPosition
readatomicassign

Indicates whether the detector found the face's right mouth corner.

- (CGPoint) rightMouthPosition
readatomicassign

The coordinates of the right mouth corner, relative to the detected image in the view coordinate system.

- (BOOL) hasLeftMouthPosition
readatomicassign

Indicates whether the detector found the face's left mouth corner.

- (CGPoint) leftMouthPosition
readatomicassign

The coordinates of the left mouth corner, relative to the detected image in the view coordinate system.

- (BOOL) hasLeftEarPosition
readatomicassign

Indicates whether the detector found the midpoint of the face's left ear tip and left ear lobe.

- (CGPoint) leftEarPosition
readatomicassign

The coordinates of the midpoint between the face's midpoint of the left ear tip and left ear lobe, relative to the detected image in the view coordinate system.

- (BOOL) hasRightEarPosition
readatomicassign

Indicates whether the detector found the face's left ear tip.

Treating the top of the face's left ear as a circle, this is the point at 45 degrees around the circle in Cartesian coordinates.

- (CGPoint) rightEarPosition
readatomicassign

The coordinates of the midpoint between the face's midpoint of the right ear tip and right ear lobe, relative to the detected image in the view coordinate system.

- (BOOL) hasLeftEyePosition
readatomicassign

Indicates whether the detector found the face’s left eye.

- (CGPoint) leftEyePosition
readatomicassign

The coordinates of the left eye, relative to the detected image in the view coordinate system.

- (BOOL) hasRightEyePosition
readatomicassign

Indicates whether the detector found the face’s right eye.

- (CGPoint) rightEyePosition
readatomicassign

The coordinates of the right eye, relative to the detected image in the view coordinate system.

- (BOOL) hasLeftCheekPosition
readatomicassign

Indicates whether the detector found the face's left cheek.

- (CGPoint) leftCheekPosition
readatomicassign

The coordinates of the left cheek, relative to the detected image in the view coordinate system.

- (BOOL) hasRightCheekPosition
readatomicassign

Indicates whether the detector found the face's right cheek.

- (CGPoint) rightCheekPosition
readatomicassign

The coordinates of the right cheek, relative to the detected image in the view coordinate system.

- (BOOL) hasNoseBasePosition
readatomicassign

Indicates whether the detector found the midpoint between the face's nostrils where the nose meets the face.

- (CGPoint) noseBasePosition
readatomicassign

The coordinates of the midpoint between the nostrils, relative to the detected image in the view coordinate system.

- (BOOL) hasSmilingProbability
readatomicassign

Indicates whether a smiling probability is available.

- (CGFloat) smilingProbability
readatomicassign

A value between 0.0 and 1.0 giving a probability that the face is smiling.

- (BOOL) hasLeftEyeOpenProbability
readatomicassign

Indicates whether a left eye open probability is available.

- (CGFloat) leftEyeOpenProbability
readatomicassign

A value between 0.0 and 1.0 giving a probability that the face's left eye is open.

- (BOOL) hasRightEyeOpenProbability
readatomicassign

Indicates whether a right eye open probability is available.

- (CGFloat) rightEyeOpenProbability
readatomicassign

A value between 0.0 and 1.0 giving a probability that the face's right eye is open.

- (CGRect) bounds
readatomicassigninherited

The rectangle that holds the discovered feature relative to the detected image in the view coordinate system.

- (NSString*) type
readatomiccopyinherited

The type of feature that was discovered.

- (BOOL) hasTrackingID
readatomicassigninherited

Indicates whether the object has a tracking ID.

- (NSUInteger) trackingID
readatomicassigninherited

The tracking identifier of the feature.

This ID is not associated with a specific feature but identifies the same face among consecutive video frames.