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.
FingerprintImagecan be converted to template by calling
FingerprintTemplate(FingerprintImage)constructor. 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(byte serialized)Deserialize fingerprint template from compressed JSON.
FingerprintTemplate(FingerprintImage image)Create fingerprint template from fingerprint image.
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description
empty()Get the empty template with no biometric data.
toByteArray()Serialize fingerprint template as compressed JSON.
public FingerprintTemplate(FingerprintImage image)Create fingerprint template from fingerprint image. This constructor runs an expensive feature extractor algorithm, which analyzes the image and collects identifiable biometric features from it.
image- fingerprint image to process
nullor image data in it was not set
public FingerprintTemplate(byte serialized)Deserialize fingerprint template from compressed JSON. This constructor reads gzip-compressed JSON template produced by
toByteArray()and reconstructs 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.
serialized- serialized fingerprint template in gzip-compressed JSON format produced by
serializedis is not in the correct format or it is corrupted
- See Also:
toByteArray(), Template format,
@Deprecated public FingerprintTemplate()Deprecated.Instantiate an empty fingerprint template. This constructor is deprecated. In the past, it was used together with methods
convert(byte), which are all deprecated now. Use
public static FingerprintTemplate empty()Get the empty template with no biometric data. Empty template is useful as a fallback to simplify code. It contains no biometric data and it doesn't match any other template including itself. There is only one global instance. This method doesn't instantiate any new objects.
- empty template
@Deprecated public FingerprintTemplate transparency(FingerprintTransparency transparency)Deprecated.Enable algorithm transparency. Since
FingerprintTransparencyis activated automatically via thread-local variable in recent versions of SourceAFIS, this method does nothing in current version of SourceAFIS. It will be removed in some later version.
@Deprecated public FingerprintTemplate dpi(double dpi)Deprecated.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. This method is deprecated. Use
@Deprecated public FingerprintTemplate create(byte image)Deprecated.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), JNBIS library (WSQ), and Android's Bitmap class (PNG, JPEG, BMP) in this order. Note that these libraries might not support all versions and variations of the mentioned formats. This method replaces any previously added biometric data in this template. This method is deprecated. Use
@Deprecated public FingerprintTemplate deserialize(String json)Deprecated.Deserialize fingerprint template from JSON string. This method does the same thing as
FingerprintTemplate(byte)constructor except it uses plain JSON format produced by
FingerprintTemplate(byte)instead. This method replaces any previously added biometric data in this template.
public byte toByteArray()Serialize fingerprint template as compressed JSON. Serialized template can be stored in a database or sent over network. It can be deserialized by calling
FingerprintTemplate(byte)constructor. 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.
@Deprecated public String serialize()Deprecated.Serialize fingerprint template to JSON string. This deprecated method is equivalent to
toByteArray()except that the output format is an uncompressed JSON string.
- serialized fingerprint template in JSON format
- See Also:
@Deprecated public FingerprintTemplate convert(byte template)Deprecated.Import ANSI INCITS 378 or ISO 19794-2 fingerprint template from another fingerprint recognition system. This method replaces any previously added biometric data in this template. This method is deprecated. Use