Mac Developer Library

Developer

QuartzCore Framework Reference CIFaceFeature Class Reference

Options
Deployment Target:

On This Page
Language:

CIFaceFeature

A CIFaceFeature object describes a face detected in a still or video image. Its properties provide information about the face’s eyes and mouth. A face object in a video can also have properties that track its location over time—tracking ID and frame count.

Inheritance


Conforms To


Import Statement


import QuartzCore @import QuartzCore;

Availability


Available in OS X v10.7 and later.
  • bounds bounds Property

    A rectangle indicating the position and dimensions of the face in image coordinates. (read-only)

    Declaration

    Swift

    var bounds: CGRect { get }

    Objective-C

    @property(readonly, assign) CGRect bounds

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.9 and later.

  • A Boolean value that indicates whether information about face rotation is available. (read-only)

    Declaration

    Swift

    var hasFaceAngle: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL hasFaceAngle

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.9 and later.

  • faceAngle faceAngle Property

    The rotation of the face. (read-only)

    Declaration

    Swift

    var faceAngle: Float { get }

    Objective-C

    @property(readonly, assign) float faceAngle

    Discussion

    Rotation is measured counterclockwise in radians, with zero indicating that a line drawn between the eyes is horizontal relative to the image orientation.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.9 and later.

  • A Boolean value that indicates whether the detector found the face’s left eye. (read-only)

    Declaration

    Swift

    var hasLeftEyePosition: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL hasLeftEyePosition

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.7 and later.

  • A Boolean value that indicates whether the detector found the face’s right eye. (read-only)

    Declaration

    Swift

    var hasRightEyePosition: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL hasRightEyePosition

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.7 and later.

  • A Boolean value that indicates whether the detector found the face’s mouth. (read-only)

    Declaration

    Swift

    var hasMouthPosition: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL hasMouthPosition

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.7 and later.

  • The coordinates of the left eye, in image coordinates. (read-only)

    Declaration

    Swift

    var leftEyePosition: CGPoint { get }

    Objective-C

    @property(readonly, assign) CGPoint leftEyePosition

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.7 and later.

  • The coordinates of the right eye, in image coordinates (read-only)

    Declaration

    Swift

    var rightEyePosition: CGPoint { get }

    Objective-C

    @property(readonly, assign) CGPoint rightEyePosition

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.7 and later.

  • The coordinates of the mouth, in image coordinates (read-only)

    Declaration

    Swift

    var mouthPosition: CGPoint { get }

    Objective-C

    @property(readonly, assign) CGPoint mouthPosition

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.7 and later.

  • hasSmile hasSmile Property

    A Boolean value that indicates whether a smile is detected in the face. (read-only)

    Declaration

    Swift

    var hasSmile: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL hasSmile

    Discussion

    For smiles to be detected, the key CIDetectorSmile must be present with a value of YEStrue in the dictionary passed to a detector’s featuresInImage:options: method.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.9 and later.

  • A Boolean value that indicates whether the a closed left eye is detected in the face. (read-only)

    Declaration

    Swift

    var leftEyeClosed: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL leftEyeClosed

    Discussion

    “Left” is relative to the original (non-mirrored) image orientation, not to the owner of the eye.

    For closed eyes to be detected, the key CIDetectorEyeBlink must be present with a value of YEStrue in the dictionary passed to a detector’s featuresInImage:options: method.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.9 and later.

  • A Boolean value that indicates whether the a closed left eye is detected in the face. (read-only)

    Declaration

    Swift

    var rightEyeClosed: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL rightEyeClosed

    Discussion

    “Right” is relative to the original (non-mirrored) image orientation, not to the owner of the eye.

    For closed eyes to be detected, the key CIDetectorEyeBlink must be present with a value of YEStrue in the dictionary passed to a detector’s featuresInImage:options: method.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.9 and later.

  • A Boolean value that indicates whether the face object has a tracking ID. (read-only)

    Declaration

    Swift

    var hasTrackingID: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL hasTrackingID

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.8 and later.

  • The tracking identifier of the face object. (read-only)

    Declaration

    Swift

    var trackingID: Int32 { get }

    Objective-C

    @property(readonly, assign) int trackingID

    Discussion

    Core Image provides a tracking identifier for faces it detects in a video stream, which you can use to identify when a CIFaceFeature objects detected in one video frame is the same face detected in a previous video frame.

    This identifier persists only as long as a face is in the frame and is not associated with a specific face. In other words, if a face moves out of the video frame and comes back into the frame later, another ID is assigned. (Core Image detects faces, but does not recognize specific faces.)

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.8 and later.

  • A Boolean value that indicates the face object has a tracking frame count. (read-only)

    Declaration

    Swift

    var hasTrackingFrameCount: Bool { get }

    Objective-C

    @property(readonly, assign) BOOL hasTrackingFrameCount

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.8 and later.

  • The tracking frame count of the face. (read-only)

    Declaration

    Swift

    var trackingFrameCount: Int32 { get }

    Objective-C

    @property(readonly, assign) int trackingFrameCount

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.8 and later.