Package com.appliedrec.verid.core2
Class FaceRecognition
- java.lang.Object
-
- com.appliedrec.verid.core2.FaceRecognition
-
- All Implemented Interfaces:
IFaceRecognition
public class FaceRecognition extends java.lang.Object implements IFaceRecognition
Ver-ID SDK's default implementation of theIFaceRecognitioninterface
-
-
Field Summary
Fields Modifier and Type Field Description VerIDFaceTemplateVersiondefaultFaceTemplateVersion
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()floatcompareSubjectFacesToFaces(IRecognizable[] subjectFaces, IRecognizable[] faces)Compare faces belonging to a subject (person) to other facesRecognizableFaceconvertFaceCaptureFace(FaceCapture faceCapture, VerIDFaceTemplateVersion faceTemplateVersion)RecognizableFace[]createRecognizableFacesFromFaces(Face[] faces, IImageProvider imageProvider)Create faces that can be used for face recognition from faces detected in an imageRecognizableFace[]createRecognizableFacesFromFaces(Face[] faces, IImageProvider imageProvider, VerIDFaceTemplateVersion faceTemplateVersion)IRecognizablegenerateFaceTemplateWithScore(float score, IRecognizable otherTemplate)IRecognizablegenerateRandomFaceTemplate(VerIDFaceTemplateVersion version)Generate a random facefloatgetAuthenticationThreshold()floatgetAuthenticationThreshold(VerIDFaceTemplateVersion faceTemplateVersion)floatgetAutoRegistrationScoreThreshold()floatgetAutoRegistrationScoreThreshold(VerIDFaceTemplateVersion faceTemplateVersion)Get auto registration score threshold for the given face template versionjava.util.Set<VerIDFaceTemplateVersion>getAvailableFaceTemplateVersions()floatgetMaxAuthenticationScore()Get the maximum possible authentication scorefloat[]getRawFaceTemplate(RecognizableFace face)Get "raw" face template that can be compared with other face templatesvoidsetAuthenticationScoreThreshold(float threshold, VerIDFaceTemplateVersion faceTemplateVersion)voidsetAuthenticationThreshold(float threshold)Set authentication thresholdvoidsetAutoRegistrationScoreThreshold(float autoRegistrationScoreThreshold)Deprecated.voidsetAutoRegistrationScoreThreshold(VerIDFaceTemplateVersion faceTemplateVersion, float autoRegistrationScoreThreshold)Set auto registration score threshold for the given face template versionIRecognizable[]transcribeFaceTemplates(IRecognizable[] faceTemplates, VerIDFaceTemplateVersion version)Transcribe face templates to a different template version
-
-
-
Field Detail
-
defaultFaceTemplateVersion
public final VerIDFaceTemplateVersion defaultFaceTemplateVersion
-
-
Method Detail
-
getMaxAuthenticationScore
public float getMaxAuthenticationScore()
Get the maximum possible authentication score- Specified by:
getMaxAuthenticationScorein interfaceIFaceRecognition- Returns:
- 5.4
-
getAuthenticationThreshold
public float getAuthenticationThreshold()
- Specified by:
getAuthenticationThresholdin interfaceIFaceRecognition- Returns:
- Similarity score threshold beyond which two faces are considered to belong to the same person
- See Also:
IFaceRecognition.compareSubjectFacesToFaces(IRecognizable[], IRecognizable[])
-
getAuthenticationThreshold
public float getAuthenticationThreshold(VerIDFaceTemplateVersion faceTemplateVersion)
-
setAuthenticationThreshold
public void setAuthenticationThreshold(@FloatRange(from=0.0,to=5.4) float threshold)Set authentication threshold- Specified by:
setAuthenticationThresholdin interfaceIFaceRecognition- Parameters:
threshold- Similarity score threshold beyond which two faces are considered to belong to the same person- See Also:
IFaceRecognition.getAuthenticationThreshold()
-
setAuthenticationScoreThreshold
public void setAuthenticationScoreThreshold(@FloatRange(from=0.0,to=5.4) float threshold, VerIDFaceTemplateVersion faceTemplateVersion)
-
getAutoRegistrationScoreThreshold
public float getAutoRegistrationScoreThreshold()
-
setAutoRegistrationScoreThreshold
@Deprecated public void setAutoRegistrationScoreThreshold(float autoRegistrationScoreThreshold)
Deprecated.
-
setAutoRegistrationScoreThreshold
public void setAutoRegistrationScoreThreshold(VerIDFaceTemplateVersion faceTemplateVersion, float autoRegistrationScoreThreshold)
Set auto registration score threshold for the given face template versionThis threshold is used when automatically registering users after a successful authentication
- Parameters:
faceTemplateVersion- Face template version for which to set the thresholdautoRegistrationScoreThreshold- Threshold- Since:
- 2.3.0
-
getAutoRegistrationScoreThreshold
public float getAutoRegistrationScoreThreshold(VerIDFaceTemplateVersion faceTemplateVersion) throws VerIDCoreException
Get auto registration score threshold for the given face template versionThis threshold is used when automatically registering users after a successful authentication
- Parameters:
faceTemplateVersion- Face template version for which to get the threshold- Returns:
- Threshold
- Throws:
VerIDCoreException- If a threshold for the face template isn't set- Since:
- 2.3.0
-
getAvailableFaceTemplateVersions
public java.util.Set<VerIDFaceTemplateVersion> getAvailableFaceTemplateVersions()
-
compareSubjectFacesToFaces
@FloatRange(from=0.0, to=5.4) public float compareSubjectFacesToFaces(@NonNull IRecognizable[] subjectFaces, @NonNull IRecognizable[] faces) throws VerIDCoreExceptionCompare faces belonging to a subject (person) to other faces- Specified by:
compareSubjectFacesToFacesin interfaceIFaceRecognition- Parameters:
subjectFaces- The subject faces to compare to the other facesfaces- Faces to compare to the subject faces- Returns:
- Similarity score
- Throws:
VerIDCoreException
-
createRecognizableFacesFromFaces
public RecognizableFace[] createRecognizableFacesFromFaces(Face[] faces, IImageProvider imageProvider) throws VerIDCoreException
Create faces that can be used for face recognition from faces detected in an image- Specified by:
createRecognizableFacesFromFacesin interfaceIFaceRecognition- Parameters:
faces- Faces to use as sourceimageProvider- Provider of the image in which the faces were detected- Returns:
- Array of faces that can be used for face recognition
- Throws:
VerIDCoreException
-
createRecognizableFacesFromFaces
public RecognizableFace[] createRecognizableFacesFromFaces(Face[] faces, IImageProvider imageProvider, VerIDFaceTemplateVersion faceTemplateVersion) throws VerIDCoreException
- Throws:
VerIDCoreException
-
getRawFaceTemplate
public float[] getRawFaceTemplate(RecognizableFace face) throws VerIDCoreException
Get "raw" face template that can be compared with other face templates- Parameters:
face- Face from which to extract the raw template- Returns:
- Array of floats representing a raw face template
- Throws:
VerIDCoreException
-
transcribeFaceTemplates
public IRecognizable[] transcribeFaceTemplates(IRecognizable[] faceTemplates, VerIDFaceTemplateVersion version) throws VerIDCoreException
Transcribe face templates to a different template version- Parameters:
faceTemplates- Face templates to transcribeversion- Version to transcribe the templates to- Returns:
- Transcribed face templates
- Throws:
VerIDCoreException- Since:
- 2.1.0
-
close
public void close()
- Specified by:
closein interfaceIFaceRecognition
-
generateRandomFaceTemplate
public IRecognizable generateRandomFaceTemplate(VerIDFaceTemplateVersion version) throws VerIDCoreException
Generate a random faceCan be used in tests where a random face is required
- Returns:
- Random face that can be used in face recognition
- Throws:
VerIDCoreException
-
generateFaceTemplateWithScore
public IRecognizable generateFaceTemplateWithScore(float score, IRecognizable otherTemplate) throws VerIDCoreException
- Throws:
VerIDCoreException
-
convertFaceCaptureFace
public RecognizableFace convertFaceCaptureFace(FaceCapture faceCapture, VerIDFaceTemplateVersion faceTemplateVersion) throws VerIDCoreException
- Throws:
VerIDCoreException
-
-