Parsing and validating biometric files according to the ANSI/NIST-ITL 1-2000 standard is typically performed using the reference implementation provided in the NIST Biometric Image Software (NBIS) suite. The core toolkit inside NBIS dedicated to processing these traditional, text-and-binary-delimited transaction files is known as AN2K. Core Structure of an ANSI/NIST-ITL 1-2000 File
Before diving into software utilities, it is crucial to understand that an ANSI/NIST file (often carrying a .nist, .an2k, or .eft extension) acts as a structured wrapper. It bundles text metadata and compressed binary imagery into numbered Logical Records:
Type-1: Transaction Information. Contains the mandatory file header, version number, destination agency, and file logical structure.
Type-2: Descriptive Text. User-defined biographical data (e.g., name, birthdate, case numbers).
Type-3 & 4: Fingerprint Image Data. Contains low/high-resolution grayscale fingerprint image payloads (often utilizing WSQ compression).
Type-9: Minutiae Data. Textual/binary coordinates marking fingerprint ridge characteristics.
Type-10: Facial, Scar, Mark, & Tattoo (SMT) Images. Contains JPEG/raw photo data.
Fields within text records are strictly delimited using special ASCII characters: Information Separator 4 (US / 0x1F): Separates subfields.
Information Separator 3 (RS / 0x1E): Separates repeating items. Information Separator 2 (GS / 0x1D): Separates data fields.
Information Separator 1 (FS / 0x1C): Terminates a logical record. Step 1: Pre-Parsing Validation
Any parser must execute pre-parsing checks before digging into binary buffers to protect system integrity:
File Check: Verify that the file object exists, is not null, and possesses valid byte arguments.
Magic Number Check: The NIST Conformance Test Architecture mandates reading the first prefix bytes. Because every transaction must begin with Record Type 1, the first two characters of the stream must be ASCII 1.. Step 2: Parsing Files with the AN2K Utility Suite
The open-source NIST Biometric Image Software (NBIS) features compiled C command-line tools that automatically handle low-level parsing mechanisms:
an2k2txt (Parsing to Plaintext): Parses a raw binary ANSI/NIST file and unrolls its fields into a human-readable text file mapping records, tags, and field values. It extracts internal binary images into individual files (like .wsq or .jpg) and references them by path inside the generated text file.
txt2an2k (Compiling back to Binary): Performs the inverse operation. It reads a structured text specification file, gathers the target images, verifies the alignments, and compiles them into a valid, standard-compliant .nist binary payload. Step 3: Low-Level C/C++ Programmatic Parsing
If you are developing a custom application using the standard NBIS C library source code, parsing relies on reading records into data structures sequential to the file stream:
Allocate a Workspace: Read the binary file into memory as a byte stream.
Scan Record Type-1: Locate the standard 1.003 field (File Content) which dictates exactly which record types follow and their total byte length.
Parse Records and Fields: Tokenize the data loops using the ASCII delimiter tokens (0x1C through 0x1F).
Isolate Binary Objects: For image records (such as Type-4 or Type-10), parse the text metadata headers first (e.g., image dimensions, compression format). The binary image payload begins immediately following the field tag until the File Separator (0x1C) is hit. Step 4: Schema and Content Validation
NIST (ANSI/NIST-ITL 1-2000) library (for Windows) – MathWorks
Leave a Reply