Class UserIdentification


  • public class UserIdentification
    extends java.lang.Object
    Identify users in faces
    Since:
    1.0.0
    • Constructor Detail

      • UserIdentification

        public UserIdentification​(VerID environment)
        Constructor
        Parameters:
        environment - Ver-ID instance
        Since:
        1.0.0
    • Method Detail

      • identifyUsersInFace

        public java.util.Map<java.lang.String,​java.lang.Float> identifyUsersInFace​(RecognizableFace face)
                                                                                  throws VerIDCoreException
        Identify one or more registered users in the face.

        The function returns users whose faces compared to the given face yield a similarity score above the authentication threshold.

        Parameters:
        face - The face in which to identify the users
        Returns:
        Map of user IDs and similarity scores – higher score = better match
        Throws:
        VerIDCoreException - if the identification fails
        Since:
        1.0.0
      • identifyUsersInFace

        public java.util.Map<java.lang.String,​java.lang.Float> identifyUsersInFace​(RecognizableFace face,
                                                                                         java.util.function.Function<VerIDFaceTemplateVersion,​java.lang.Float> thresholdSupplier)
                                                                                  throws VerIDCoreException
        Identify one or more registered users in the face.

        The function returns users whose faces compared to the given face yield a similarity score above the threshold obtained from the threshold supplier function.

        Parameters:
        face - The face in which to identify the users
        thresholdSupplier - Function that supplies the threshold for comparisons using the given face template version
        Returns:
        Map of user IDs and similarity scores – higher score = better match
        Throws:
        VerIDCoreException - if the identification fails
      • findFacesSimilarTo

        public void findFacesSimilarTo​(@NonNull
                                       IRecognizable face,
                                       @NonNull @Size(min=1L)
                                       IRecognizable[] faces,
                                       @Nullable
                                       java.lang.Float threshold,
                                       @NonNull
                                       UserIdentificationCallbacks callbacks)
        Find faces similar to another face
        Parameters:
        face - Face to compare other faces to
        faces - Other faces to compare to the face
        threshold - Similarity score threshold or null to use the environment's default threshold
        callbacks - Callbacks that consume the result