Add bozorth3 from NBIS; implement verify for image devices

uru4000 works splendiferously (YAY!)
aes4000 is going to need some work though :(
This commit is contained in:
Daniel Drake
2007-10-28 00:21:49 +01:00
parent 41b25f28a4
commit 6b8d17ef26
14 changed files with 3260 additions and 27 deletions

View File

@@ -175,24 +175,6 @@ API_EXPORTED void fp_img_standardize(struct fp_img *img)
}
}
static int sort_x_y(const void *a, const void *b)
{
struct minutiae_struct *af = (struct minutiae_struct *) a;
struct minutiae_struct *bf = (struct minutiae_struct *) b;
if (af->col[0] < bf->col[0])
return -1;
if (af->col[0] > bf->col[0])
return 1;
if (af->col[1] < bf->col[1])
return -1;
if (af->col[1] > bf->col[1])
return 1;
return 0;
}
/* Based on write_minutiae_XYTQ and bz_load */
static void minutiae_to_xyt(MINUTIAE *minutiae, int bwidth,
int bheight, unsigned char *buf)
@@ -277,3 +259,21 @@ int fpi_img_detect_minutiae(struct fp_img_dev *imgdev, struct fp_img *img,
return r;
}
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->buffer;
struct xyt_struct *pstruct = (struct xyt_struct *) new_print->buffer;
GTimer *timer;
int r;
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;
}