Search code examples
c#fingerprint

Digital Persona Verifying process take a lot of time with huge database


I'm developing a software that is using the Digital Persona U.are.U 4000b fingerprint reader.

It's working OK. But I'm getting performance problems during fingerprint verification.

My database has around 3.000 fingerprints registered there and I need to LOOP all of them during the verify process.

But every successful fingerprint reading take around 7 seconds to match the respective record of my database (it depends on its index).

It's not an acceptable scenario for me, because I need to register (and show their data, photo ... in real-time) at least 400 students in an interval of 20 minutes. The problem is really the huge fingerprints database, because when I tested it with a smaller one, it worked fine.

I'm using .NET with C# and a Free SDK for the fingerprints. The line of code that is causing this trouble is that one, which is executed into a FOREACH (for each registered fingerprint of the database):

verificator.Verify(features, template, ref result);
  • verificator is a DPFP.Verification.Verification object which treats the verification process;
  • features is a DPFP.FeatureSet object which contains the data of the actual fingerprint;
  • template is a DPFP.Template object which represents each of the registered fingerprints;
  • result is a DPFP.Verification.Verification.Result object which contains the return of each fingerprint validation.

Here is the whole process method:

    protected void process(DPFP.Sample sample)
    {
        DPFP.FeatureSet features = ExtractFeatures(sample, DPFP.Processing.DataPurpose.Verification);
        bool verified = false;
        if (features != null)
        {
            DPFP.Verification.Verification.Result result = new DPFP.Verification.Verification.Result();
            //"allTemplates" is an List<> of objects that contains all the templates previously loaded from DB
            //There is no DB access in these lines of code
            foreach (var at in allTemplates)
            {
                verificator.Verify(features, at.template, ref result);
                if (result.Verified)
                {
                    register(at.idStudent);
                    verified = true;
                    break;
                }
            }
        }
        if (!verified)
            error("Invalid student.");
    }

Am I doing it correctly?

There is another way of doing that work?


Solution

  • I solved my problem by purchasing (I "won" it, because I had already bought a reader) the new version of the SDK, that already implements the identify (1:n) function. You can get more information and download (purchase) the SDK at their website.