I'm trying to verify finger print using digital persona sdk. I'm able to capture and save the template to MySQL database using the following code but the problem is during verification. It's always show failed when I try to verify a finger print. This is the enrollment and verification code. I would have posted enrollment code but stackoverflow couldn't let me due to lengthy code
protected void process(DPFPSample sample) {
super.process(sample);
// Process the sample and create a feature set for the enrollment purpose.
features = extractFeatures(sample, DPFPDataPurpose.DATA_PURPOSE_VERIFICATION);
// Check quality of the sample and start verification if it's good
if (features != null) {
// Compare the feature set with our template
DPFPVerificationResult result = verificator.verify(features, ((MainForm) getOwner()).getTemplate());
// updateStatus(result.getFalseAcceptRate());
if (result.isVerified()) {
try {
DPFPTemplate templat = ((MainForm) getOwner()).getTemplate();
byte[] vrr = templat.serialize();
pst = con.prepareStatement("select fingerprint from accounts where fingerprint=?");
pst.setBytes(1, vrr);
rs = pst.executeQuery();
if (rs.next()) {
JOptionPane.showMessageDialog(this, "Fingerprint doesn't match the User ID", "Unable to Login", JOptionPane.ERROR_MESSAGE);
} else {
JOptionPane.showMessageDialog(this, "Fingerprint doesn't match the User ID", "Unable to Login", JOptionPane.ERROR_MESSAGE);
}
} catch (SQLException e) {
}
} else {
makeReport("The fingerprint was NOT VERIFIED.");
JOptionPane.showMessageDialog(this, "The fingerprint was NOT VERIFIED.", "Verification Failed", JOptionPane.ERROR_MESSAGE);
}
}
}