int bozorth(char * pProbeFile, char * pGalleryFile){ /* Structs con información de las minutias */ struct xyt_struct * pstruct = XYT_NULL; struct xyt_struct * gstruct = XYT_NULL; /* Resultado de la comparación */ int score; /* Carga archivo de referencia */ pstruct = bz_load( pProbeFile ); if ( pstruct == XYT_NULL ) { printf("Error loading p\n"); return -1; } /* Carga archivo de comparación */ gstruct = bz_load( pGalleryFile ); if ( gstruct == XYT_NULL ) { printf("Error loading g\n"); return -2; } /* Define los nombres de los archivos de referencia y comparación * que están siendo procesados*/ set_probe_filename( pProbeFile ); set_gallery_filename( pGalleryFile ); /* Compara los archivos */ score = bozorth_main(pstruct, gstruct); /* Libera memoria */ free( (char *) pstruct); free( (char *) gstruct); printf("Resultado: %d\n", score); return score; }
int fpi_img_compare_print_data(struct fp_print_data *enrolled_print, struct fp_print_data *new_print) { struct xyt_struct *gstruct = (struct xyt_struct *) enrolled_print->data; struct xyt_struct *pstruct = (struct xyt_struct *) new_print->data; GTimer *timer; int r; if (enrolled_print->type != PRINT_DATA_NBIS_MINUTIAE || new_print->type != PRINT_DATA_NBIS_MINUTIAE) { fp_err("invalid print format"); return -EINVAL; } timer = g_timer_new(); r = bozorth_main(pstruct, gstruct); g_timer_stop(timer); fp_dbg("bozorth processing took %f seconds, score=%d", g_timer_elapsed(timer, NULL), r); g_timer_destroy(timer); return r; }
int compare_templates (signed char templ1[2404], signed char templ2[2404]) { return bozorth_main ((struct xyt_struct *) templ1, (struct xyt_struct *) templ2); }