public class FingerprintTemplate extends ObjectBiometric description of a fingerprint suitable for efficient matching. Fingerprint template holds high-level fingerprint features, specifically ridge endings and bifurcations (together called minutiae). Original image is not preserved in the fingerprint template and there is no way to reconstruct the original fingerprint from its template. Fingerprint image can be converted to template by calling
create(byte)method on an empty fingerprint template instantiated with
FingerprintTemplate()constructor. Image DPI may be specified first by calling
dpi(double). Since image processing is expensive, applications should cache serialized templates. Serialization into JSON format is performed by
serialize()method. JSON template can be deserialized by calling
deserialize(String). on an empty fingerprint template instantiated with
FingerprintTemplate()constructor. Matching is performed by constructing
FingerprintMatcher, passing probe fingerprint to its
FingerprintMatcher.index(FingerprintTemplate)method, and then passing candidate fingerprints to its
FingerprintTemplatecontains two kinds of data: fingerprint features and search data structures. Search data structures speed up matching at the cost of some RAM. Only fingerprint features are serialized. Search data structures are recomputed after every deserialization.
Constructors Constructor and Description
FingerprintTemplate()Instantiate an empty fingerprint template.
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description
convert(byte iso)Import ISO 19794-2 fingerprint template from another fingerprint recognition system.
create(byte image)Create fingerprint template from fingerprint image.
deserialize(String json)Deserialize fingerprint template from JSON string.
dpi(double dpi)Set DPI (dots per inch) of the fingerprint image.
serialize()Serialize fingerprint template to JSON string.
transparency(FingerprintTransparency transparency)Enable algorithm transparency.
public FingerprintTemplate()Instantiate an empty fingerprint template. Empty template represents fingerprint with no features that does not match any other fingerprint (not even itself). You can then call one of the methods
convert(byte)to actually fill the template with useful biometric data.
public FingerprintTemplate transparency(FingerprintTransparency transparency)Enable algorithm transparency. Subsequent operations on this template will report intermediate data structures created by the algorithm to the provided
public FingerprintTemplate dpi(double dpi)Set DPI (dots per inch) of the fingerprint image. This is the DPI of the image later passed to
create(byte). Check your fingerprint reader specification for correct DPI value. Default DPI is 500.
dpi- DPI of the fingerprint image, usually around 500
- See Also:
public FingerprintTemplate create(byte image)Create fingerprint template from fingerprint image. The image must contain black fingerprint on white background at the DPI specified by calling
dpi(double). The image may be in any format commonly used to store fingerprint images, including PNG, JPEG, BMP, TIFF, or WSQ. SourceAFIS will try to decode the image using Java's
ImageIO(PNG, JPEG, BMP), Sanselan library (TIFF), and JNBIS library (WSQ) in this order. Note that these libraries might not support all variations of the mentioned formats. This method replaces any previously added biometric data in this template.
public FingerprintTemplate deserialize(String json)Deserialize fingerprint template from JSON string. This method reads JSON string produced by
serialize()to reconstruct an exact copy of the original fingerprint template. Templates produced by previous versions of SourceAFIS may fail to deserialize correctly. Applications should re-extract all templates from original raw images when upgrading SourceAFIS. This method replaces any previously added biometric data in this template.
public String serialize()Serialize fingerprint template to JSON string. Serialized template can be stored in a database or sent over network. It can be deserialized by calling
deserialize(String). Persisting templates alongside fingerprint images allows applications to start faster, because template deserialization is more than 100x faster than re-extraction from fingerprint image. Serialized template excludes search structures that
FingerprintTemplatekeeps to speed up matching. Serialized template is therefore much smaller than in-memory
FingerprintTemplate. Serialization format can change with every SourceAFIS version. There is no backward compatibility of templates. Applications should preserve raw fingerprint images, so that templates can be re-extracted after SourceAFIS upgrade. Template format for current version of SourceAFIS is documented on SourceAFIS website.
public FingerprintTemplate convert(byte iso)Import ISO 19794-2 fingerprint template from another fingerprint recognition system. This method can import biometric data from ISO 19794-2 templates, which carry fingerprint features (endings and bifurcations) without the original image. This method replaces any previously added biometric data in this template. This method is written for ISO 19794-2:2005, but it might be able to handle ISO 19794-2:2011 templates as well. No other fingerprint template formats are currently supported. Note that the use of ISO 19794-2 templates is strongly discouraged and support for the format might be removed in future releases. This is because ISO is very unfriendly to opensource developers, Its "standards" are only available for a high fee and with no redistribution rights. There is only one truly open and widely used fingerprint exchange format: fingerprint images. Application developers are encouraged to collect, store, and transfer fingerprints as images. Besides compatibility and simplicity this brings, use of images allows SourceAFIS to co-tune its feature extractor and matcher for higher accuracy.