SourceAFIS
HomeDownloadJavadoc.NET ReferenceForum
com.machinezoo.sourceafis

Class FingerprintTemplate

SourceAFIS » API Reference



  • public class FingerprintTemplate
    extends Object
    Biometric description of a fingerprint suitable for efficient matching. Fingerprint template holds high-level fingerprint features, specifically ridge endings and bifurcations (minutiae). Original image is not preserved in the fingerprint template and there is no way to reconstruct the original fingerprint from its template.
    Fingerprint template can be created from fingerprint image by calling FingerprintTemplate(byte[]). Since image processing is expensive, applications should cache serialized templates. Serialization is performed by json() and deserialization by FingerprintTemplate(String).
    Matching is performed by constructing FingerprintMatcher and calling its FingerprintMatcher.match(FingerprintTemplate) method.
    FingerprintTemplate contains search structures that speed up matching at the cost of some RAM. These search structures do not contain any unique data. They can be recomputed from minutiae. They are therefore excluded from serialized templates.
    See Also:
    SourceAFIS overview, FingerprintMatcher
    • Constructor Detail

      • FingerprintTemplate

        public FingerprintTemplate(byte[] image)
        Create fingerprint template from raw fingerprint image. Image must contain black fingerprint on white background at 500dpi. For images at different DPI, call FingerprintTemplate(byte[], double).
        Parameters:
        image - fingerprint image in a format supported by Java's ImageIO, for example JPEG, PNG, or BMP
        See Also:
        FingerprintTemplate(byte[], double)
      • FingerprintTemplate

        public FingerprintTemplate(byte[] image,
                                   double dpi)
        Create fingerprint template from raw fingerprint image with non-default DPI. This constructor's behavior is identical to FingerprintTemplate(byte[]) except that custom DPI (dots per inch) can be specified. Check your fingerprint reader specification for correct DPI value.
        Parameters:
        image - fingerprint image in a format supported by Java's ImageIO
        dpi - DPI of the image
        See Also:
        FingerprintTemplate(byte[])
      • FingerprintTemplate

        public FingerprintTemplate(String json)
        Deserialize fingerprint template from JSON string. This constructor reads JSON string produced by json() to reconstruct 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.
        Parameters:
        json - serialized fingerprint template in JSON format
        See Also:
        json()
    • Method Detail

      • json

        public String json()
        Serialize fingerprint template to JSON string. Serialized template can be stored in database or sent over network. It can be deserialized by calling FingerprintTemplate(String). Persisting templates alongside fingerprint images allows applications to start faster, because template deserialization is more than 100x faster than re-extraction from raw image.
        Serialized template excludes search structures that FingerprintTemplate keeps 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.
        Returns:
        serialized fingerprint template in JSON format
        See Also:
        FingerprintTemplate(String)