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.
What is the NFIQ2 CLI?
The NFIQ2 command-line interface (nfiq2) is a standalone executable tool for computing ISO/IEC 29794-4:2024 unified quality scores for 500 PPI ink and live scan plain impression fingerprint images. It serves as a reference implementation of the international standard and provides a fast, efficient way to assess fingerprint image quality from the terminal.
Key Features
- Batch Processing: Process multiple images, directories, or RecordStores in a single command
- Multi-threading: Utilize multiple CPU cores for faster processing of large datasets
- Multiple Input Formats: Support for common image formats (BMP, JPEG, PNG, TIFF, WSQ, etc.) and biometric standards
- CSV Output: Machine-readable output format for easy integration with data pipelines
- Quality Feedback: Optional actionable feedback and detailed quality metrics
- Flexible Configuration: Custom model parameters and output options
The CLI tool outputs scores in CSV format by default, making it ideal for batch processing and automated workflows.
When to Use the CLI vs. Library
Use the CLI Tool When:
- Batch processing multiple fingerprint images
- Processing entire directories or RecordStores
- Running quality checks from scripts or automation pipelines
- Performing one-time quality assessments
- Testing or evaluating NFIQ2 capabilities
- You need CSV output for downstream analysis
Use the Library When:
- Integrating NFIQ2 into your own application
- Building real-time quality assessment systems
- You need programmatic access to quality features
- Custom integration with your existing codebase
- Mobile or embedded platform deployment
- You require fine-grained control over the quality assessment process
Supported Input Formats
The NFIQ2 CLI supports a wide range of input formats:Image Formats
- BMP
- JPEG / JPEG-LS
- JPEG 2000
- PBM/PGM/PPM
- PNG
- TIFF
- WSQ
Biometric Standards
- ANSI/NIST-ITL 1-2007+ (Type 14)
- ISO/IEC 19794-4
- Biometric Evaluation Framework RecordStores
Image Requirements
Required Specifications
| Requirement | Value | Notes |
|---|---|---|
| Resolution | 500 PPI | Can be resampled automatically with -F |
| Color Depth | 8-bit grayscale | Maximum 255 shades of gray |
| Width | 196-800 pixels | After whitespace cropping |
| Height | 196-1000 pixels | After whitespace cropping |
Automatic Processing
When using the-F (Force) flag, NFIQ2 will automatically:
- Quantize images with incorrect bit depth to 8-bit grayscale
- Resample images to 500 PPI when source resolution is known
- Assume 500 PPI if resolution cannot be determined
Building the CLI Tool
Prerequisites
Building the CLI requires additional dependencies beyond the library:Library Dependencies
- OpenCV 4 (bundled as submodule)
- FingerJetFX OSE (bundled as submodule)
- digestpp (bundled as submodule)
CLI-Specific Dependencies
- Biometric Evaluation Framework (bundled as submodule)
- NIST Fingerprint Image Resampler (bundled as submodule)
- Additional system packages (see libbiomeval README)
Build Instructions
You must recursively clone the repository to retrieve all git submodules. Do not use the GitHub ZIP file download.
Build Options
Control the build with these CMake options:| Option | Default | Description |
|---|---|---|
BUILD_NFIQ2_CLI | ON | Build the command-line interface |
EMBED_RANDOM_FOREST_PARAMETERS | OFF | Embed model parameters into the library |
EMBEDDED_RANDOM_FOREST_PARAMETER_FCT | 0 | Friction ridge capture technology code for embedded parameters |
- Build Library Only
- Build with Embedded Parameters
- Custom Build Type
Installation
After building, thenfiq2 executable will be located in the build directory:
- Linux/macOS:
build/bin/nfiq2 - Windows:
build\bin\Release\nfiq2.exe
Quick Start
Once installed or built, test the CLI tool:Next Steps
Usage Guide
Learn about command-line options and syntax
Examples
See real-world usage examples with output