public class FingerprintImage extends Object
FingerprintTemplate. Since SourceAFIS algorithm is not scale-invariant, all images should have DPI configured explicitly by calling
Application should start fingerprint processing by constructing an instance of
FingerprintImage and then passing it to
Fingerprint image can be either in one of the supported image formats (PNG, JPEG, ...), in which case method
decode(byte) is used, or it can be a raw grayscale image, for which method
grayscale(int, int, byte) is used.
|Constructor and Description|
Creates new container for fingerprint image data.
|Modifier and Type||Method and Description|
Decodes fingerprint image in standard format.
Sets DPI (dots per inch) of the fingerprint image.
Reads raw grayscale fingerprint image from byte array.
FingerprintTemplateuntil at least pixel data is provided by calling
grayscale(int, int, byte).
public FingerprintImage dpi(double dpi)
grayscale(int, int, byte). Check your fingerprint reader specification for correct DPI value. Default DPI is 500.
public FingerprintImage decode(byte image)
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, and on Java 9+ 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.
image- fingerprint image in one of the supported formats
IllegalArgumentException- if the image format is unsupported or the image is corrupted
grayscale(int, int, byte),
public FingerprintImage grayscale(int width, int height, byte pixels)
Pixels are represented as 8-bit unsigned bytes with 0 meaning black and 255 meaning white. Java's byte is a signed 8-bit number, but this method interprets all 8 bits as an unsigned number as if by calling
Byte.toUnsignedInt(byte). Pixels in
pixels array are ordered from top-left to bottom-right in horizontal rows. Size of
pixels must be equal to
width * height.
width- width of the image
height- height of the image
pixels- image pixels ordered from top-left to bottom-right in horizontal rows
heightis not positive or if
pixelslength is not
width * height
Copyright © 2009–2020 Robert Važan. All rights reserved.