Class FaceDetectionResult


  • public class FaceDetectionResult
    extends java.lang.Object
    Face detection result
    Since:
    1.0.0
    • Constructor Detail

    • Method Detail

      • getImageSize

        @NonNull
        public Size getImageSize()
        Get the size of the image in which the face was being detected.
        Returns:
        Image size in pixels
        Since:
        1.0.0
      • getFace

        @NonNull
        public java.util.Optional<Face> getFace()
        Get the detected face.
        Returns:
        Face
        Since:
        1.0.0
      • setFace

        public void setFace​(@Nullable
                            Face face)
      • getFaceBounds

        @NonNull
        public java.util.Optional<android.graphics.RectF> getFaceBounds()
        Get the bounds of the detected face.

        These bounds may be smoothed using values from faces detected previously in the session.

        If you are displaying the bounds to the user use these bounds instead of the bounds from the face.

        Returns:
        Rectangle representing the detected face
        Since:
        1.0.0
      • getFaceAngle

        @NonNull
        public java.util.Optional<EulerAngle> getFaceAngle()
        Get the angle of the detected face.

        The angle may be smoothed using values from faces detected previously in the session.

        If you are displaying the angle to the user use this angle instead of the angle from the face.

        Returns:
        Face angle
        Since:
        1.0.0
      • getStatus

        @NonNull
        public FaceDetectionStatus getStatus()
        Get the status of face detection.
        Returns:
        Face detection status
        Since:
        1.0.0
      • getRequestedBearing

        @NonNull
        public Bearing getRequestedBearing()
        Get the requested bearing
        Returns:
        Bearing
        Since:
        1.0.0
      • getFaceLandmarks

        @NonNull
        public java.util.Optional<android.graphics.PointF[]> getFaceLandmarks()
      • setDefaultFaceBounds

        public void setDefaultFaceBounds​(FaceBounds defaultFaceBounds)
      • getDefaultFaceBounds

        @NonNull
        public FaceBounds getDefaultFaceBounds()
      • getOffsetAngleFromBearing

        public EulerAngle getOffsetAngleFromBearing()
      • setImage

        public void setImage​(Image image)
      • getRequestedAngle

        public java.util.Optional<EulerAngle> getRequestedAngle()
      • setRequestedAngle

        public void setRequestedAngle​(@Nullable
                                      EulerAngle requestedAngle)