Class FaceDetection

    • Field Detail

      • detRecLib

        public final DetRecLib detRecLib
        Core C++ library wrapper
        Since:
        1.0.0
    • Method Detail

      • detectFacesInImage

        public Face[] detectFacesInImage​(IImageProvider image,
                                         int limit,
                                         int options)
                                  throws VerIDCoreException
        Detect faces in image
        Specified by:
        detectFacesInImage in interface IFaceDetection
        Parameters:
        image - Image in which to detect faces
        limit - Limit the number of detected faces to this value
        options - Flags
        Returns:
        Array of detected faces
        Throws:
        VerIDCoreException - Error if detection fails
        Since:
        1.0.0
      • close

        public void close()
        Close the face detection and cleanup resources
        Specified by:
        close in interface IFaceDetection
        Since:
        1.0.0
      • setFaceExtractQualityThreshold

        public void setFaceExtractQualityThreshold​(float faceExtractQualityThreshold)
                                            throws java.lang.Exception
        Set face extract quality threshold

        Face template extraction (for face recognition) will only be run if the detected face's quality meets this threshold.

        Parameters:
        faceExtractQualityThreshold - New threshold value
        Throws:
        java.lang.Exception - Exception
        Since:
        1.8.0
      • getFaceExtractQualityThreshold

        public float getFaceExtractQualityThreshold()
                                             throws java.lang.Exception
        Get face extract quality threshold

        Face template extraction (for face recognition) will only be run if the detected face's quality meets this threshold.

        Returns:
        threshold value
        Throws:
        java.lang.Exception - Exception
        Since:
        1.8.0
      • setLandmarkTrackingQualityThreshold

        public void setLandmarkTrackingQualityThreshold​(float landmarkTrackingQualityThreshold)
                                                 throws java.lang.Exception
        Set landmark tracking quality threshold

        Full face detection (slower) will be run if the detected face quality falls below this threshold when tracking a face in a sequence of images

        Parameters:
        landmarkTrackingQualityThreshold - New threshold value
        Throws:
        java.lang.Exception - Exception
        Since:
        1.8.0
      • getLandmarkTrackingQualityThreshold

        public float getLandmarkTrackingQualityThreshold()
                                                  throws java.lang.Exception
        Get landmark tracking quality threshold

        Full face detection (slower) will be run if the detected face quality falls below this threshold when tracking a face in a sequence of images

        Returns:
        threshold value
        Throws:
        java.lang.Exception - Exception
        Since:
        1.8.0
      • getDiagnosticImageFromFace

        public android.graphics.Bitmap getDiagnosticImageFromFace​(Face face,
                                                                  Image image)
                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • detectFaceCovering

        @FloatRange(from=0.0,
                    to=1.0)
        public float detectFaceCovering​(Face face,
                                        IImageProvider image)
                                 throws VerIDCoreException
        Detect whether the face is obscured by a face covering like a face mask or a scarf
        Parameters:
        face - Face on which to detect a covering
        image - Image containing the face
        Returns:
        Confidence score indicating the presence of a face covering 0 = no covering, 1 = covering
        Throws:
        VerIDCoreException