it is a java code; I need to identify users from their fingerprint; I have over 50,000 records in my table; when a user places their finger on the fingerprint I do a foreach of all users to find the match; with this approach the process takes several minutes and will be annoying for users;
I would like to know if there is another approach I can use to limit this; need your help.
DPFPTemplate referenceTemplate = DPFPGlobal.getTemplateFactory().createTemplate();
byte[] templateBuffer;
DPFPVerificationResult result;
DbMysql dbMysql = new DbMysql();
ResultSet dataFinger = dbMysql.getFingerData();
while (dataFinger.next()) {
String fingerprint = dataFinger.getString("fingerprint");
String person_id = dataFinger.getString("person_id");
if(fingerprint.equals("")){
continue;
}
templateBuffer = Base64.getDecoder().decode(fingerprint);
referenceTemplate.deserialize(templateBuffer);
result = dpfpVerification.verify(featuresVerification, referenceTemplate);
if (result.isVerified()) {
messageStatus = "fingerFound";
personId = person_id;
break;
}
System.out.println("#PID" + person_id);
}
here are the libraries: base64-2.3.7.jar, dpfpenrollment.jar, dpfpverification.jar, msql-connector-java-8.0.30.jar; my SDK is 18;
(dpfpenrollment.jar, dpfpverification.jar) to learn more about the fingerprint SDK I use please see this link