1

I am working on a Digital Persona 5300 fingerprint reader, and I have an SQL database with fingerprints captured in varbinary format, I want to know if there is a way to obtain the fingerprint and generate an FMD to compare a fingerprint captured in the reader with the database to know who it belongs to. Here is a part of my code that i have tried but cant get it to work

            try{
            Engine engine = UareUGlobal.GetEngine();
                Fmd fmd = engine.CreateFmd(evt.capture_result.image, Fmd.Format.ANSI_378_2004);
                m_fmds[0] = fmd; //Save the fingerprint capture

            }
            catch(UareUException e){ MessageBox.DpError("Engine.CreateFmd()", e); }

            if(null != m_fmds[0] ){
                //perform comparison
                try{


                  Connection connection;
            connection = con.conectar();
            //Get all fingerprints
            PreparedStatement identificarStmt = null;
                                        try {
                                            identificarStmt = connection.prepareStatement("SELECT no_empleado,id_relojChecador FROM relojChecador_empleado");
                                                            ResultSet rs = null;

                                            rs = identificarStmt.executeQuery();

                                            //Find the fingerprint
                                            while(rs.next())
                                            {                                                                                                                                                                                                            
                                                //Lee la plantilla de la base de datos
                                                byte templateBuffer[] = rs.getBytes("id_relojChecador");
                                                String nombre=rs.getString("no_empleado");

                                                Fmd fmd = engine.CreateFmd(templateBuffer, templateBuffer.length, WIDTH, WIDTH, WIDTH, WIDTH, Fmd.Format.DP_REG_FEATURES);

                    int falsematch_rate = engine.Compare(m_fmds[0], 0, m_fmds[1], 0);

                    int target_falsematch_rate = Engine.PROBABILITY_ONE / 100000; //target rate is 0.00001                                          

if(falsematch_rate < target_falsematch_rate){
                            m_text.append("Fingerprints matched.\n");
                            String str = String.format("dissimilarity score: 0x%x.\n", falsematch_rate);
                            m_text.append(str);
                            str = String.format("false match rate: %e.\n\n\n", (double)(falsematch_rate / Engine.PROBABILITY_ONE));
                            m_text.append(str);
                        }
                        else{
                            m_text.append("Fingerprints did not match.\n\n\n");
                        }
                    }
                    catch(UareUException e){ MessageBox.DpError("Engine.CreateFmd()", e); }

                                                }                           } catch (SQLException ex) {
                                                Logger.getLogger(Verification.class.getName()).log(Level.SEVERE, null, ex);
                                            }    



                //discard FMDs
                m_fmds[0] = null;
                m_fmds[1] = null;           
            }               
  • What is the format of the fingerprints saved as varbinary in the SQL database? Varbinary is for SQL to specify column entity data type. – Joseph Dec 04 '19 at 10:36

0 Answers0