Class MicrosoftCognitiveServiceFaceDetection

  • All Implemented Interfaces:
    FaceDetection<short[][][]>

    public class MicrosoftCognitiveServiceFaceDetection
    extends Object
    implements FaceDetection<short[][][]>

    This class provides face detection functionality using microsoft cognitive service face api

    Since:
    1.0
    Author:
    Andreas Pointner
    • Constructor Detail

      • MicrosoftCognitiveServiceFaceDetection

        public MicrosoftCognitiveServiceFaceDetection()
    • Method Detail

      • detectFaces

        public Collection<FaceInformation<short[][][]>> detectFaces​(ImageWrapper<short[][][]> ji)
        Detects a face in the image, and returns a FaceInformation object to describe it. https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236
        Specified by:
        detectFaces in interface FaceDetection<short[][][]>
        Parameters:
        ji - the image where the face should be detected
        Returns:
        the information about the detected face
      • verifyFace

        public double verifyFace​(FaceInformation<short[][][]> face1,
                                 FaceInformation<short[][][]> face2)
        Calculates a confidence value, if there is the same person on img1 and on img2 https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a
        Specified by:
        verifyFace in interface FaceDetection<short[][][]>
        Parameters:
        face1 - first face
        face2 - second face
        Returns:
        confidence value if the two faces on the images are the same