libfprint
|
libfprint offers several ways of retrieving images from imaging devices, one example being the fp_dev_img_capture() function. More...
Data Structures | |
struct | fp_minutia |
Functions | |
void | fp_img_free (struct fp_img *img) |
Frees an image. More... | |
int | fp_img_get_height (struct fp_img *img) |
Gets the pixel height of an image. More... | |
int | fp_img_get_width (struct fp_img *img) |
Gets the pixel width of an image. More... | |
unsigned char * | fp_img_get_data (struct fp_img *img) |
Gets the greyscale data for an image. More... | |
int | fp_img_save_to_file (struct fp_img *img, char *path) |
A quick convenience function to save an image to a file in PGM format. More... | |
void | fp_img_standardize (struct fp_img *img) |
Standardizes an image by normalizing its orientation, colors, etc. More... | |
struct fp_img * | fp_img_binarize (struct fp_img *img) |
Get a binarized form of a standardized scanned image. More... | |
struct fp_minutia ** | fp_img_get_minutiae (struct fp_img *img, int *nr_minutiae) |
Get a list of minutiae detected in an image. More... | |
libfprint offers several ways of retrieving images from imaging devices, one example being the fp_dev_img_capture() function.
The functions documented below allow you to work with such images.
All images are represented as 8-bit greyscale data.
In some contexts, images you are provided through libfprint are raw images from the hardware. The orientation of these varies from device-to-device, as does the color scheme (black-on-white or white-on-black?). libfprint provides the fp_img_standardize function to convert images into standard form, which is defined to be: finger flesh as black on white surroundings, natural upright orientation.
void fp_img_free | ( | struct fp_img * | img | ) |
Frees an image.
Must be called when you are finished working with an image.
img | the image to destroy. If NULL, function simply returns. |
Referenced by fp_enroll_finger_img(), fp_identify_finger_img(), and fp_verify_finger_img().
int fp_img_get_height | ( | struct fp_img * | img | ) |
Gets the pixel height of an image.
img | an image |
int fp_img_get_width | ( | struct fp_img * | img | ) |
Gets the pixel width of an image.
img | an image |
unsigned char* fp_img_get_data | ( | struct fp_img * | img | ) |
Gets the greyscale data for an image.
This data must not be modified or freed, and must not be used after fp_img_free() has been called.
img | an image |
int fp_img_save_to_file | ( | struct fp_img * | img, |
char * | path | ||
) |
A quick convenience function to save an image to a file in PGM format.
img | the image to save |
path | the path to save the image. Existing files will be overwritten. |
void fp_img_standardize | ( | struct fp_img * | img | ) |
Standardizes an image by normalizing its orientation, colors, etc.
It is safe to call this multiple times on an image, libfprint keeps track of the work it needs to do to make an image standard and will not perform these operations more than once for a given image.
img | the image to standardize |
struct fp_img* fp_img_binarize | ( | struct fp_img * | img | ) |
Get a binarized form of a standardized scanned image.
This is where the fingerprint image has been "enhanced" and is a set of pure black ridges on a pure white background. Internally, image processing happens on top of the binarized image.
The image must have been standardized otherwise this function will fail.
It is safe to binarize an image and free the original while continuing to use the binarized version.
You cannot binarize an image twice.
img | a standardized image |
struct fp_minutia** fp_img_get_minutiae | ( | struct fp_img * | img, |
int * | nr_minutiae | ||
) |
Get a list of minutiae detected in an image.
A minutia point is a feature detected on a fingerprint, typically where ridges end or split. libfprint's image processing code relies upon comparing sets of minutiae, so accurate placement of minutia points is critical for good imaging performance.
The image must have been standardized otherwise this function will fail.
You cannot pass a binarized image to this function. Instead, pass the original image.
Returns a list of pointers to minutiae, where the list is of length indicated in the nr_minutiae output parameter. The returned list is only valid while the parent image has not been freed, and the minutiae data must not be modified or freed.
img | a standardized image |
nr_minutiae | an output location to store minutiae list length |