RRFaceDetection

Objective-C

@interface RRFaceDetection : NSObject

Swift

class RRFaceDetection : NSObject

This class provides face detection functionality. It provides a boundinbox rectangle as wall as a flag indicating a straight pose of the head for each face in the given image.

  • This method provides face detection functionality for images of type RRImage.

    Declaration

    Objective-C

    + (NSArray<RRFaceDetectionResult *> *_Nullable)detectFacesInImage:
        (RRImage *_Nonnull)image;

    Swift

    class func detectFaces(in image: RRImage) -> [RRFaceDetectionResult]?

    Parameters

    image

    An RRImage image instance.

    Return Value

    An array of RRFaceDetectionResult instances, where each instance describes a detected face in the image.

  • This method provides face detection functionality for images of type CVPixelBufferRef.

    Declaration

    Objective-C

    + (NSArray<RRFaceDetectionResult *> *_Nullable)
        detectFacesInImageBuffer:(CVPixelBufferRef _Nonnull)imageBuffer
                     orientation:(CGImagePropertyOrientation)orientation;

    Swift

    class func detectFaces(inImageBuffer imageBuffer: CVPixelBuffer, orientation: CGImagePropertyOrientation) -> [RRFaceDetectionResult]?

    Parameters

    imageBuffer

    A CVPixelBufferRef image buffer instance.

    orientation

    The image orientation of the provided image buffer.

    Return Value

    An array of RRFaceDetectionResult instances, where each instance describes a detected face in the image.

  • This method provides facial landmarks detection functionality for images of type RRImage.

    Declaration

    Objective-C

    + (RRFacialLandmarks *_Nullable)
        detectFacialLandmarksInImage:(RRImage *_Nonnull)image
                       faceRectangle:(CGRect)faceRectangle;

    Swift

    class func detectFacialLandmarks(in image: RRImage, faceRectangle: CGRect) -> RRFacialLandmarks?

    Parameters

    image

    An RRImage image instance.

    faceRectangle

    The face rectangle containing the face to detect the facial landmarks in.

    Return Value

    A RRFacialLandmarks instance containing the detected facial landmarks

  • This method provides facial landmarks detection functionality for images of type CVPixelBufferRef.

    Declaration

    Objective-C

    + (RRFacialLandmarks *_Nullable)
        detectFacialLandmarksInImageBuffer:(CVPixelBufferRef _Nonnull)imageBuffer
                               orientation:(CGImagePropertyOrientation)orientation
                             faceRectangle:(CGRect)faceRectangle;

    Swift

    class func detectFacialLandmarks(inImageBuffer imageBuffer: CVPixelBuffer, orientation: CGImagePropertyOrientation, faceRectangle: CGRect) -> RRFacialLandmarks?

    Parameters

    imageBuffer

    A CVPixelBufferRef image buffer instance.

    orientation

    The image orientation of the provided image buffer.

    faceRectangle

    The face rectangle containing the face to detect the facial landmarks in.

    Return Value

    A RRFacialLandmarks instance containing the detected facial landmarks