0

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);
           }
       }
   }
Emperor
  • 81
  • 1
  • 9
  • Maybe you could explain what you are attempting to do if (result.isVerified()) is true and show how you are doing capturing and saving fingerprint. – Joseph Dec 04 '19 at 10:15

1 Answers1

0

Edit the statement to-> if(rs.next){

JOptionPane.showMessageDialog(this,"FIngerprint success match USERID"); }

Sam
  • 1