How to create digital persona FMD from byte[] in Android?

0

I am able to save FMD to SQLite in Android. However when I am trying to recreate FMD it is not working properly.

Saving FMD in database.

try {
                        Fmd m_enrollmant_fmd = m_engine.CreateEnrollmentFmd(Fmd.Format.ANSI_378_2004, enrollThread);
                        if (m_success = (m_enrollmant_fmd != null)) {
                            byte[] fingerprintData = m_enrollmant_fmd.getData();
                            int fingerprintImageHeight = m_enrollmant_fmd.getHeight();
                            int fingerprintImageWidth = m_enrollmant_fmd.getWidth();
                            int fingerprintResolution = m_enrollmant_fmd.getResolution();
                            int fingerPosition = m_enrollmant_fmd.getViews()[0].getFingerPosition();
                            int cbeffId = m_enrollmant_fmd.getCbeffId();
                            int m_templateSize = m_enrollmant_fmd.getData().length;
                            m_current_fmds_count = 0; // reset count on success
                            // Save above values in database and this is working fine.
                        }
                    } catch (Exception e) {
                        m_current_fmds_count = 0;
                    }

Recreating FMD Code:

Fmd temp_fmd = m_engine.CreateFmd(
                                user.fingerPrint,  // byte[]
                                user.width,  // width
                                user.height, // height
                                user.resolution, // resolution
                                user.fingerPrint, //Finger position,
                                user.cbeffId, // Cbeff Id
                                Fmd.Format.ANSI_378_2004); // Format algorithm


                        if (temp_fmd != null) {
                            // m_fmd is FMD that we generate after taking fingerprint
                            int m_score = m_engine.Compare(m_fmd, 0, temp_fmd, 0);
                            if (m_score < (0x7FFFFFFF / 100000)) {
                                userFound = user;
                                break;
                            }
                        }

This gives me UareUException saying FID is invalid. However when I try to give fix values in m_engine.CreateFmd(...) except byte[] parameter, it works fine but its dissimilarity is 100%, meaning it doesn't match at all. Any help will be appreciated. I am using UareU SDK 3.1 from Crossmatch (previously known as Digital Persona).

Note that values from Database are correct there is no issue in that. Only I am unable to create correct FMD.

android
fingerprint
digital-persona-sdk
uareu-sdk
asked on Stack Overflow Nov 28, 2019 by Faizan Mubasher

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0