Rework some image handling; add public binarization API

I want to offer the ability for an application to view a binarized
version of a scanned print. This lead onto a few changes:

 1. Store minutiae and binarized data inside fp_img
 2. Move resize code to the capture path, it previously happened much
    later.
 3. Add fp_img_binarize() to return a new image in binarized form.
 4. Add a BINARIZED_FORM flag to prevent an image being binarized again.

In future, it would be nice to be able to binarize without detecting
minutiae, but this involves some work on the NBIS interaction.
This commit is contained in:
Daniel Drake
2007-11-17 12:46:00 +00:00
parent 72c304999a
commit ba24c0884a
8 changed files with 198 additions and 106 deletions

View File

@@ -630,7 +630,7 @@ static int capture(struct fp_img_dev *dev, gboolean unconditional,
*ret = img;
return 0;
err:
g_free(img);
fp_img_free(img);
return r;
}

View File

@@ -181,7 +181,7 @@ retry:
return 0;
err:
g_free(data);
g_free(img);
fp_img_free(img);
return r;
}

View File

@@ -360,7 +360,7 @@ static int capture(struct fp_img_dev *dev, gboolean unconditional,
*ret = img;
return 0;
err:
g_free(img);
fp_img_free(img);
return r;
}