Return
Fingerprint Generator
Right Hand
R1 · Thumb
R2 · Index
R3 · Middle
R4 · Ring
R5 · Pinky
Left Hand
L1 · Thumb
L2 · Index
L3 · Middle
L4 · Ring
L5 · Pinky
Persona avatar
—

Deterministic Fingerprint Generation

This application uses the actual-fingerprints library to generate deterministic synthetic fingerprints from a seed value. The same seed always produces the same fingerprint, byte for byte, on any machine. This deterministic property is achieved through pure integer arithmetic and custom trigonometric functions built from basic mathematical operations, ensuring identical output across all JavaScript engines including browsers and Node.js. [GitHub, actual-fingerprints]

SFinGe Recipe and Pattern Selection

The generator implements the SFinGe (Synthetic Fingerprint Generator) algorithm developed at the University of Bologna's Biometric System Laboratory. This peer-reviewed approach to fingerprint synthesis has been widely adopted in biometric research for creating realistic yet artificial prints that avoid privacy concerns of real fingerprints. The process begins with pattern selection, where the seed determines the fingerprint class based on empirically measured population frequencies. [University of Bologna, SFinGe Project] Fingerprint patterns fall into eight categories: loops (approximately 60% of the population), whorls (approximately 30%), and arches and other patterns (approximately 10%).

Singular Points and Orientation Field Calculation

After pattern selection, singular points—specifically cores and deltas—are positioned according to the pattern type using mathematical models that ensure natural placement. The orientation field is then calculated by deriving ridge directions from these singular points, quantized into 32 discrete orientation bins (each representing 5.625 degrees). This approach ensures that ridge patterns flow naturally around the singular points, creating realistic ridge dynamics. The quantized field guides all subsequent ridge generation, ensuring consistency and visual realism. [Wikipedia, Fingerprint]

Ridge Growth Using Gabor Filters

Ridge growth is accomplished using a kernel bank of 256 Gabor filters, organized into 8 frequency (period) bins and 32 orientation bins corresponding to the orientation field. Gabor filters are mathematical tools well-suited to detecting oriented patterns like fingerprint ridges. The algorithm places random seeds within the fingerprint area and applies Gabor filters iteratively, each pass replacing pixels with the sign of their Gabor response. This in-place operation uses block-level dirty tracking to optimize performance, completing a typical 320×400 pixel print in approximately 100 milliseconds.

Ink Effect and Final Refinement

The final stage applies an ink effect to simulate realistic fingerprint imperfections: pressure variation across the contact area, faded edges where ink transfer is incomplete, pores (small circular features), dry patches where insufficient ink was transferred, and creases formed by natural skin folds. These details, while not essential for fingerprint matching, significantly enhance visual realism. The completed synthetic print is then rendered to a canvas element for display and can be exported as image or PDF.

Pattern Classification and Population Distribution

Fingerprints are classified into eight distinct pattern types based on ridge structure, a standardized system established by Henry and later refined by the FBI and Interpol for forensic identification. The generator models these eight types with population frequencies that match empirical data from large-scale fingerprint databases compiled over decades of law enforcement practice. [Wikipedia, Fingerprint Classification] These patterns remain stable throughout a person's lifetime and are unique even among identical twins, making them the foundation of biometric identification systems.

Loops (Approximately 63% of Patterns)

Left Loops and Right Loops each account for approximately 31.5% of fingerprints. In loops, ridges enter from one side of the finger, curve around a core point, and exit from the same side. The classification depends on the direction of the opening relative to the thumb: a loop opening toward the thumb is a right loop, while one opening toward the little finger is a left loop. [FBI, Fingerprints and Biometrics] This directional bias reflects natural anatomical variation in hand development. When generating fingerprints, the hand parameter biases loop patterns toward the ulnar side (little finger side) or radial side (thumb side): approximately 94% of loop patterns open toward the thumb on most fingers, a consistent asymmetry across human populations.

Whorls (Approximately 27% of Patterns)

Plain Whorls make up approximately 24% of fingerprints and feature circular or spiral ridge patterns with two singular points (cores). The ridges form concentric circles or spirals around the center. Central Pocket Loops account for approximately 3% and combine whorl and loop characteristics: a whorl-like pattern with an enclosed loop structure. Both whorl variants indicate complex ridge organization and are associated with genetic factors that remain an active area of biometric research.

Double Loops and Other Patterns (Approximately 10% of Patterns)

Double Loops represent approximately 4% of fingerprints and feature two distinct loop patterns within a single print, each with its own core and delta. Plain Arches represent approximately 4% of fingerprints, featuring ridges that enter from one side and exit the other in a gentle wave-like pattern, with no enclosed loops or whorls. Tented Arches are rarer at approximately 1%, characterized by an arch pattern with a central sharp upthrust or peak. Accidental Patterns also comprise approximately 1% and include combinations or variations that don't fit the primary seven categories. Together, these patterns are associated with certain genetic traits and are particularly useful in forensic cases for narrowing suspect databases. [FBI, Fingerprints and Biometrics]

Orientation Field Computation

The orientation field is calculated using mathematical techniques from the SFinGe algorithm, a comprehensive approach for computing ridge flow directions in fingerprints. Singular points (cores and deltas) are used to guide the orientation field, treating them as anchors in the mathematical model. The algorithm adjusts the field to produce smooth ridge orientations that vary naturally from the singular points outward, creating a realistic flow pattern. This ensures that the computed orientation field maintains the topological properties expected in genuine fingerprints. [Wikipedia, Fingerprint]

Ridge Synthesis Using Gabor Filter Bank

Ridge synthesis employs a kernel bank of 256 precomputed Gabor filters organized into 8 frequency (period) bins and 32 orientation bins, providing high-resolution directional guidance. Gabor filters are well-established in image processing for detecting oriented periodic patterns and are particularly effective for fingerprint ridge modeling. [Wikipedia, Gabor Filter] The algorithm begins by placing seeds throughout the fingerprint area and iteratively applies Gabor filters matched to the local orientation field. Each iteration replaces pixels with the sign of their filter response, progressively refining and strengthening the ridge pattern. This in-place operation uses optimizations to minimize redundant computation, allowing the algorithm to generate a 320×400 pixel fingerprint in approximately 100 milliseconds on typical hardware without compromising visual quality.

Minutiae Extraction and Classification

After ridge synthesis, the library extracts ridge endpoints and bifurcations—the minutiae features used by fingerprint matching algorithms in law enforcement and biometric systems. Ridge extraction uses the Zhang-Suen thinning algorithm, a morphological technique that reduces ridge patterns to single-pixel-width skeleton structures while preserving topological properties. Pruning then removes spurious features (spurs) shorter than 10 pixels that would otherwise constitute noise. Minutiae classification uses crossing number analysis, a local neighborhood approach that identifies feature types based on pixel connectivity. Direction calculations follow ISO/IEC 19794-2 conventions, the international standard for fingerprint data interchange, ensuring compatibility with forensic and biometric databases. [ISO, IEC 19794-2 Standard]

Determinism and Cross-Platform Consistency

The library achieves guaranteed deterministic output across all execution environments—web browsers, Node.js, and specialized platforms like FiveM—by using zero external dependencies and implementing all mathematical operations in pure integer arithmetic. Trigonometric functions are computed from basic arithmetic rather than relying on platform-specific math libraries, eliminating floating-point rounding variations that would otherwise cause divergence across environments. This determinism is essential for reproducible research and for applications requiring consistent results from the same seed across different machines and JavaScript engines.

Performance Characteristics

Generation performance scales with resolution: a 320×400 pixel fingerprint completes in approximately 100 milliseconds on typical modern hardware, while higher resolutions are supported for archival or forensic-quality output. The algorithm's efficiency makes it suitable for real-time generation of multiple prints, as in this application where all ten fingers are generated nearly instantaneously. Memory usage is proportional to the output image dimensions, with no auxiliary data structures required for the core pipeline.