-1

I am developing a biometric attendance system in Java, MySQL for the device digitalPersona. But during the fingerprint verification when I retrieve the fingerprint data (i.e. BLOB) from database every time it is showing different data. Ultimately result showing that "Not verified". following is the code which i m writing for verification.

       String query = "select * from employee";
        try {
            res = conn.getRecords(query, con);
            while(res.next()) {
                **System.out.println("Name : "+res.getString(1));**

                Blob data1 =res.getBlob("fingerprint");
                **System.out.println("Fingerprint data from DB: "+data1);**

                int blobLengh=(int)data1.length();
                byte data[]=data1.getBytes(1, blobLengh);

                DPFPTemplate t = DPFPGlobal.getTemplateFactory().createTemplate();
                t.deserialize(data);
                //setTemplate(t); 
                System.out.println("from DB: "+t);

                System.out.println("Current Finger: "+features);
                DPFPVerificationResult result;                    
                result = verificator.verify(features,t);                    
                updateStatus(result.getFalseAcceptRate());
                //System.out.println(result.isVerified());
                if (result.isVerified()){
                    System.out.println("The fingerprint was VERIFIED.");
                    System.exit(0);
                }
                else{
                    System.out.println("The fingerprint was NOT VERIFIED.");
                }
            }
        } catch (SQLException ex) {
            //Logger.getLogger(AlreadyRegisteredDetails.class.getName()).log(Level.SEVERE, null, ex);
            ex.printStackTrace();
        }

Every time i scan my finger output comes like that

Using the fingerprint reader, scan your fingerprint.

Name: amar

Fingerprint data from database: [B@872ebe

Name: amar

Fingerprint data from database: [B@f029f6

Name: amar

Fingerprint data from database: [B@1da6b61

Name: amar

Fingerprint data from database: [B@bc2ca4

Name: amar

Fingerprint data from database: [B@6d7f85

  • possible duplicate of [How do I print my Java object without getting "SomeType@2f92e0f4"?](http://stackoverflow.com/questions/29140402/how-do-i-print-my-java-object-without-getting-sometype2f92e0f4) – Artjom B. Sep 01 '15 at 17:17
  • Show your `getRecords` method. – zulqarnain Sep 01 '15 at 18:58
  • public ResultSet getRecords(String query, Connection conn)throws SQLException{ this.conn = conn; try{ stmt = conn.createStatement(); result = stmt.executeQuery(query); }catch(Exception se) { System.out.println("Sql connection not found"); se.printStackTrace(); }
    return result; }
    – Amar Jyoti Chetia Sep 02 '15 at 08:29
  • But My verification is not working, why ? – Amar Jyoti Chetia Sep 03 '15 at 11:01

1 Answers1

0

Looking at the documentation the usage of the verification api seems correct. The only possible cause is very low FAR. To make sure that's the issue, set your FAR to PROBABILITY_ONE and repeat the experiment. If you do get 'verified' results, slowly decrease the FAR to reasonable values (at least MEDIUM_SECURITY_FAR).

Evert
  • 354
  • 2
  • 7
  • Thanks ! I tried this way also, but again it is not verifying the finger. If i store the fingerprint template in a ".fpt" file and load the data from that file before verification then it is working fine. But i want to load it from database. – Amar Jyoti Chetia Sep 08 '15 at 11:13