Documentation Index
Fetch the complete documentation index at: https://mintlify.com/usnistgov/NFIQ2/llms.txt
Use this file to discover all available pages before exploring further.
Synopsis
Thenfiq2 command-line tool has two main usage patterns:
Basic Usage
Single Image
Process a single fingerprint image:When processing a single image without
-v or -q flags, only the quality score is printed (no CSV headers).Multiple Images
Process multiple images with CSV output:Command-Line Options
Output Options
Verbose output - Includes individual native quality measures computed during score calculation. These are the raw feature values before mapping to 0-100.
ISO/IEC 29794-1:2024 quality blocks - Provides quality component values mapped to [0-100] range. Required for inclusion in ISO/IEC 29794-1:2024 quality blocks.
Actionable quality feedback - Provides additional actionable feedback about each fingerprint image (e.g., contrast too low, insufficient foreground).
Speed/timing information - Displays elapsed time for computation of each native quality measure.
Output file - Write all output to the specified file instead of stdout. Overwrites file if it exists.
Input Options
Explicit input argument - Allows explicit specification of input paths. Equivalent to providing paths directly.
Batch file - Plain text file where each line is a path to process. Multiple batch files can be specified.batch1.txt example:
Recursive directory scanning - Recursively search directories for images. Uses depth-first traversal.
Processing Options
Force processing - Automatically quantize and/or resample images that don’t meet requirements. Does not prompt for user input.
Thread count - Number of worker threads for batch operations. One additional thread is spawned for coordinating output.
If thread count exceeds physical cores, a warning prompts to confirm or adjust to match core count.
Model information file - Path to alternative random forest parameters. Allows using custom trained models.Model file format:
If
Path is relative, it must be relative to the directory containing the model file, not the current working directory.Debug Options
Debug mode - Provides detailed information about program execution and computation steps.
Input Formats
Image Files
Supported image formats:Standard Formats
- BMP (.bmp)
- JPEG (.jpg, .jpeg)
- JPEG-LS (.jls)
- PNG (.png)
- TIFF (.tif, .tiff)
- PBM/PGM/PPM (.pbm, .pgm, .ppm)
Forensic Formats
- WSQ (.wsq) - FBI Wavelet Scalar Quantization
- JPEG 2000 (.jp2, .j2k)
Biometric Records
- ANSI/NIST-ITL
- ISO/IEC 19794-4
- RecordStores
ANSI/NIST-ITL 1-2007 and later (binary encoding)All Type 14 records within the file are processed separately.
- Type 14 records (fingerprint images)
- File extension typically
.an2
Directories
Process all supported files in a directory:Batch Files
Batch files are plain text files with one path per line:Paths in batch files can be absolute or relative to the current working directory.
Output Format
Standard CSV Output
Default output includes:| Column | Description |
|---|---|
Filename | Path to the input image |
FingerCode | Finger position code (if available) |
QualityScore | Unified quality score (0-100) |
OptionalError | Error message if processing failed |
Quantized | 1 if image was quantized, 0 otherwise |
Resampled | 1 if image was resampled, 0 otherwise |
Verbose Output (-v)
Adds columns for each native quality measure:Native quality measures are the raw feature values computed by individual quality assessment algorithms.
Quality Block Output (-b)
Adds columns for ISO/IEC 29794-1:2024 compliant quality component values (mapped to 0-100):Actionable Feedback (-a)
Adds columns with actionable quality feedback:EmptyImageOrContrastTooLowUniformImageSufficientFingerprintForeground- And more…
Timing Information (-q)
Adds columns showing elapsed time (in seconds) for each quality measure:Combining Options
Options can be combined for powerful workflows:Exit Codes
Thenfiq2 command returns standard exit codes:
| Code | Meaning |
|---|---|
0 | Success - all images processed |
1 | Error - invalid arguments or processing failure |
Individual image processing errors are reported in the
OptionalError column and do not cause the program to exit with error code.Performance Tips
Batch Similar Images
Group images by type and resolution in batch files for better cache performance.
Troubleshooting
Images not meeting requirements
Images not meeting requirements
Problem: Warning about image not meeting 8-bit, 500 PPI requirementsSolution: Use the Or manually convert images to 8-bit grayscale at 500 PPI before processing.
-F flag to automatically process:Thread count warning
Thread count warning
Problem: Warning about thread count exceeding physical coresSolution: Reduce thread count to match CPU cores:
Resolution unknown warning
Resolution unknown warning
Problem: Image resolution cannot be determinedSolution: The
-F flag will assume 500 PPI. Verify your images actually are 500 PPI, or convert them first:Out of memory errors
Out of memory errors
Problem: System runs out of memory during batch processingSolution: Reduce thread count or process in smaller batches:
Next Steps
View Examples
See real-world usage examples with actual terminal output and results