Face Verification
With or without the liveness engine, it's possible to enrol and verify an end-user with our face matching engine.
Method
BiometridAuthFace.getInstance().analyzeFace(
String biometrid_id,
String path,
SessionType session,
AuthFaceCallback context
);
analyzeFace
method
String biometrid_ id
id corresponding the biometric user
String path
absolute path to file
SessionType session
Biometrid session
AuthFaceCallback context
Applicational context
This method is responsible for the analyze of all the individual photos sent to the API. The results will be represented on the callback as shown on the example below.:
Callback
@Override
public void analyzeFaceCallback(boolean b, SessionType sessionType, FaceResponseStatus response, JSONObject jsonObject, Errors errors) {
if(!status && errors != null) {
Log.e("error", error.getMessage());
}
else {
Log.i("current session", session.getName());
Log.i("absolute path", path);
}
}
analyzeFaceCallback
callback
boolean status
Response status
SessionType session
Biometrid session
FaceResponseStatus response
Enum containing all possible outcomes
JsonObject jsonObject
Full response from the api
AuthFaceCallback context
Applicational context
Implementation example
public class ExampleActivity extends Activity
implements AuthFaceCallback {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_example);
BiometridAuthVoice.getInstance().analyzeFace(
"biometrid_id",
"path to file",
SessionType.Enroll
this
);
}
@Override
public void analyzeFaceCallback(boolean status, SessionType sessionType, FaceResponseStatus response, JSONObject jsonObject, Errors errors) {
if(!status && serrors != null) {
Log.e("error", error.getMessage());
}
else {
Log.i("current session", session.getName());
Log.i("absolute path", path);
}
...
}
For more information on this method please check our api documentation
Last updated