[fprint] conversin of fprint data to store in database

Alexander Eichert loeghaire at googlemail.com
Mon Jan 19 14:55:33 GMT 2009


2009/1/19 Daniel Drake <dan at reactivated.net>

> Alexander Eichert wrote:
>
>> Yes, the enroll-program stores one fingerprint in a blob-field within the
>> mysql db after the fingerprint is converted by "fp_print_data_get_data".
>>
>> The verify-program retrieves all fingerprints stored in the database,
>> reconverts them to an fp_print_data-struct with "fp_print_data_from_data"
>> and then searchs a match in these fingerprints for a new scanned
>> fingerprint.
>>
>> But, at the moment, reconversion with "fp_print_data_from_data" fails.
>>
>> I have tested to convert and reconvert the fingerprint-data in the
>> enroll-program as Daniel mentioned. That works.
>>
>
> OK, so this suggests a problem with your storage or retrieval code.
>
> How about trying this:
> When you get the buffer from libfprint using fp_print_data_get_data(), dump
> it to a file (as binary data). And also write it into your database.
>
> When you later retrieve it from the database, before you pass it to
> fp_print_data_from_data(), dump *that* data to another binary file.
>
> Then you will have 2 binary files that you can compare. Are they identical?
> (They should be, there is no reason for the data to have changed)
>
> Daniel
>

I have added storing in a file of converted fingerprint-data in enroll-
(before DB-insert) and verify-program (sfter DB-select).
It's the first time I will write in files. So I hope it's correct:

    FILE *datei_ptr;
    char dateiname[25];
    int ch;

    // Store converted fingerprint-data in a binary-file before DB-Insert
    sprintf(dateiname,"fprint_data_enroll");

    datei_ptr = fopen(dateiname,"wb");
    if (datei_ptr == NULL) {
        printf("Fehler beim Öffnen der Datei\n");
    } else {
        printf("Datei geöffnet\n");

        for (i=0;i<bufferlength;i++) {
            ch = data_buffer[i];
            fputc(ch, datei_ptr);
        }

        fclose(datei_ptr);
    }

Both programs generate a file (fp_data_enroll and fp_data_verify).

"file fp_data_verify" says file-type "data" (hope that's correct for
binary-data).

"diff fp_data_enroll fp_data_verify" will detect no difference.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.reactivated.net/pipermail/fprint/attachments/20090119/e486d15f/attachment.html


More information about the fprint mailing list