FirebaseMLVision Framework Reference Stay organized with collections Save and categorize content based on your preferences.
VisionFace
classVisionFace:NSObjectA human face detected in an image.
The rectangle that holds the discovered relative to the detected image in the viewcoordinate system.
Declaration
Swift
varframe:CGRect{get}Indicates whether the face has a tracking ID.
Declaration
Swift
varhasTrackingID:Bool{get}The tracking identifier of the face.
Declaration
Swift
vartrackingID:Int{get}Indicates whether the detector found the head y euler angle.
Declaration
Swift
varhasHeadEulerAngleY:Bool{get}Indicates the rotation of the face about the vertical axis of the image. Positive y euler angleis when the face is turned towards the right side of the image that is being processed.
Declaration
Swift
varheadEulerAngleY:CGFloat{get}Indicates whether the detector found the head z euler angle.
Declaration
Swift
varhasHeadEulerAngleZ:Bool{get}Indicates the rotation of the face about the axis pointing out of the image. Positive z eulerangle is a counter-clockwise rotation within the image plane.
Declaration
Swift
varheadEulerAngleZ:CGFloat{get}Indicates whether a smiling probability is available.
Declaration
Swift
varhasSmilingProbability:Bool{get}Probability that the face is smiling.
Declaration
Swift
varsmilingProbability:CGFloat{get}Indicates whether a left eye open probability is available.
Declaration
Swift
varhasLeftEyeOpenProbability:Bool{get}Probability that the face’s left eye is open.
Declaration
Swift
varleftEyeOpenProbability:CGFloat{get}Indicates whether a right eye open probability is available.
Declaration
Swift
varhasRightEyeOpenProbability:Bool{get}Probability that the face’s right eye is open.
Declaration
Swift
varrightEyeOpenProbability:CGFloat{get}Unavailable.
Returns the landmark, if any, of the given type in this detected face.
Declaration
Swift
funclandmark(ofTypetype:FaceLandmarkType)->VisionFaceLandmark?Parameters
typeThe type of the facial landmark.
Return Value
The landmark of the given type in this face.
nilif there isn’t one.Returns the contour, if any, of the given type in this detected face.
Declaration
Swift
funccontour(ofTypetype:FaceContourType)->VisionFaceContour?Parameters
typeThe type of the facial contour.
Return Value
The contour of the given type in this face.
nilif there isn’t one.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-11 UTC.