Griaule Biometrics

Startseite » Forums » FINGERPRINT SDK » Delphi Specific » Velocidade de Identificação
3 replies [Letzter Beitrag]
hthiago1
Offline
Joined: 2010-08-10
Rate this post:
0
Noch keine Bewertungen vorhanden
Velocidade de Identificação

Bom Dia !

Fiz uma aplicação exemplo baseada no modelo da Griaule, para Delphi 6-7, tenho uma base com aproximadamente 22.000 templates digitais gravadas em um campo Blob tipo TEXT. Segundo os testes que realizei aqui a consulta em casos onde tem que passar por todas as templates demora 55 segundos no PC ATHLON 64 X2, com 1GB Ram, HD SATA. Este seria o tempo correto ?

Obrigado.

taciely
Offline
Joined: 2011-05-26
Rate this post:
0
Noch keine Bewertungen vorhanden

Caro cliente,

 

Esta consulta deveria durar 1,5 segundo. Você está carregando as imagens para a memória antes de realizar a consulta? Tente armazenar as templates em um campo BLOB tipo BLOB mesmo, para guardar dados binários.

 

Qual método o senhor está utilizando? Verify ou Identify? Pois Verify demora mais que Identify.

 

Att,

 

Thiago Aciely Rodrigues;

Griaule Support Team.

hthiago1
Offline
Joined: 2010-08-10
Rate this post:
0
Noch keine Bewertungen vorhanden

A tabela é esta:

 

CREATE TABLE TEMPLATES (

    ID                    BIGINT NOT NULL,

    TEMPLATE1             BLOB SUB_TYPE 1 SEGMENT SIZE 80,

    TEMPLATE2             BLOB SUB_TYPE 1 SEGMENT SIZE 80,

    TEMPLATE3             BLOB SUB_TYPE 1 SEGMENT SIZE 80,

    FINGER                INTEGER,

    ATIVO                 INTEGER DEFAULT 1

);

O campo template usa bLOB do subtipo TEXTO.

 

Uso o metodo identy conforme abaixo:

procedure TformMain.btIdentifyClick(Sender: TObject);

var

  ret, score: Integer;

begin

  score := 0;

  // identify it

  ret := Identify(score);

  // write result to the log

  if ret > 0 then

  begin

    WriteLog('Fingerprint identified. ID = '+IntToStr(ret)+'. Score = '+

             IntToStr(score)+'.');

    PrintBiometricDisplay(true, GR_DEFAULT_CONTEXT);

  end

  else if ret = 0 then

    WriteLog('Fingerprint not Found.')

  else

    WriteError(ret);

end;

 

que puxa os dados atraves do metodo identy

// Identify current fingerprint on our database

function Identify(var score: Integer): Integer;

Var

  ret: Integer;

  tptRef: TTemplate;

Begin

  // Checking if template is valid.

  if not(TemplateIsValid())then

  begin

    Identify := ERR_INVALID_TEMPLATE;

    exit;

  end;

  // Starting identification process and supplying query template.

  ret := GrIdentifyPrepare(template.tpt, GR_DEFAULT_CONTEXT);

  // error?

  if (ret < 0) then begin

    identify := ret;

    exit;

  end;

  // Getting enrolled templates from database.

  DB.getTemplates();

  tptRef := DB.getNextTemplate();

  // Iterate over all templates in database

  if tptRef.size > 0 then

    repeat

      // Comparing current template.

      ret := GrIdentify(tptRef.tpt, score, GR_DEFAULT_CONTEXT);

      // Checking if query template and reference template match.

      if (ret = GR_MATCH) then

      begin

        Identify := tptRef.id;

        exit;

      end

      else if (ret < 0) then

        begin

          Identify := ret;

          exit;

        end;

      tptRef := DB.getNextTemplate();

    until tptRef.size <= 0;

    // end of database, return "no match" code

    Identify := GR_NOT_MATCH;

end;

 

Que faz um select na tabela

 

  SELECT id, template1 AS template FROM TEMPLATES

  UNION ALL

  SELECT id, template2 AS template FROM TEMPLATES

  UNION ALL

  SELECT id, template3 AS template FROM TEMPLATES

 

 

Obrigado

 

 
taciely
Offline
Joined: 2011-05-26
Rate this post:
0
Noch keine Bewertungen vorhanden

Caro cliente,

Você ja debugou o código para ver exatamento onde ocorre a demora? Tente debugar para encontrar o ponto onde o programa para.

Caso o problema persista ou ainda haja alguma dúvida não hesite em nos contatar.

Atenciosamente,
Thiago Aciely Rodrigues;
Griaule Support Team.