Biometric recognition: face, iris and fingerprint
Practical notes on biometric recognition (face, iris, fingerprint): definitions, algorithms, formulas, worked numerical examples, common mistakes and exam tips.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Biometric recognition uses a person's physical or behavioural traits (face, iris, fingerprint) to confirm identity. Engineers build systems for secure authentication (phones, access control), forensics and large-scale identification; understanding preprocessing, feature extraction and matching is essential for reliable real-world systems.
Key ideas
Face recognition (principal concepts)
- Face detection: find face bounding boxes in an image. Draw: a full image rectangle, a smaller rectangle around the detected face, label scale and coordinates.
- Alignment/normalization: detect landmark points (eyes, nose) and apply similarity transform to canonical pose.
- Holistic methods: Principal Component Analysis (PCA) (also called Eigenfaces) reduces high-dimensional image vectors to principal directions of variance. Define: covariance matrix C = E[(x - μ)(x - μ)^T], eigenvectors and eigenvalues of C give principal directions and variances. Show eigen-decomposition step: C u = λ u. Projection of a centered image x is u^T (x - μ).
- Linear Discriminant Analysis (LDA) (also called Fisherfaces) finds directions that maximise class separability using between-class scatter S_B and within-class scatter S_W. The Fisher criterion is J(w) = (w^T S_B w) / (w^T S_W w); solve generalized eigenproblem S_B w = λ S_W w.
- Local descriptors: Local Binary Patterns (LBP) encode local texture by thresholding neighbourhood pixels around a centre pixel; robust to monotonic illumination changes.
- Modern systems: deep CNNs learn embeddings; mention that this follows from feature-extraction topic and uses large labelled datasets. Embeddings are compared using cosine similarity; training commonly uses metric-learning losses such as triplet loss or additive angular margin softmax (ArcFace); templates can be enrolled by averaging/normalizing multiple embeddings.
Iris recognition (principal concepts)
- Iris segmentation: find inner (pupil) and outer (iris) boundaries and eyelid/occlusion masks. Draw: an eye image; mark two concentric circles approximating pupil and iris and arcs for eyelids.
- Normalization (Daugman's rubber sheet model): remap iris region from Cartesian to polar coordinates (radius r ∈ [0,1], angle θ ∈ [0,2π]) to remove scale and pupil dilation effects.
- Feature encoding: apply bandpass filters (commonly 2D Gabor filters) to the normalized strip; quantize phase to produce a binary iris code. The iris code is a fixed-length binary vector; each bit corresponds to filter response phase at a location. Occluded or unreliable bits are recorded in a mask.
- Matching: compute Hamming distance between two iris codes, ignoring masked bits; decision by threshold. To compensate for eye rotation, circularly shift one code over small angular offsets and take the minimum Hamming distance.
Fingerprint recognition (principal concepts)
- Fingerprint image preprocessing: contrast enhancement, block-wise orientation estimation, frequency estimation, Gabor filtering, binarization and thinning to single-pixel ridge skeleton.
- Minutiae: define minutiae as ridge endings and ridge bifurcations; each minutia is represented as (x, y, θ, t) where (x,y) are coordinates, θ is ridge direction, and t ∈ {ending, bifurcation} is the type.
- Matching: align two minutiae sets (rigid transform: translation + rotation), count correspondences under spatial and angular tolerances. Many systems compute a normalized matching score: matched_count / average_number_of_minutiae. In practice, elastic deformation models or tolerance growth are used to handle skin distortion.
Performance metrics (definitions)
- False Accept Rate (FAR): fraction of impostor attempts incorrectly accepted. FAR = (number of false accepts) / (number of impostor trials).
- False Reject Rate (FRR): fraction of genuine attempts incorrectly rejected. FRR = (number of false rejects) / (number of genuine trials).
- Receiver Operating Characteristic (ROC): plot of True Accept Rate (1 − FRR) vs FAR as threshold varies.
- Equal Error Rate (EER): the operating point where FAR = FRR; lower EER indicates better overall accuracy. For verification (1:1), report ROC/DET or TAR at target FAR; for identification (1:N), report Cumulative Match Characteristic (CMC) and Rank-1 rate; FAR is also called False Match Rate (FMR), and FRR is also called False Non-Match Rate (FNMR).
Connections: these topics use methods taught earlier like PCA, LDA (Pattern representation), distance measures and ROC curves, and non-parametric matching ideas.
Formulas
C = (1/N) Σ_{i=1..N} (x_i - μ)(x_i - μ)^T where C is covariance matrix, x_i are image vectors (pixel intensity values), μ is mean vector (pixel intensity values). Applies when computing PCA.
C u = λ u eigen-decomposition: u is eigenvector (unitless direction in feature space), λ is eigenvalue (variance, intensity^2). Applies for PCA basis.
y = U^T (x - μ) Projection of image x onto principal components U. x components are in the same units as the feature values (e.g., pixel intensity), and y is a coefficient vector in the same units as x (intensity units). Applies after PCA.
J(w) = (w^T S_B w) / (w^T S_W w) Fisher criterion for LDA; S_B and S_W are between- and within-class scatter matrices (intensity^2 or squared feature units). Solve generalized eigenproblem S_B w = λ S_W w.
HD = (Σ_i (c1_i XOR c2_i) · m_i) / (Σ_i m_i) Hamming distance for binary codes c1,c2 with mask m (m_i = 1 if bit i valid), dimensionless in [0,1]. Applies to iris code matching.
Matching score = M / ((N1 + N2)/2) where M = number of matched minutiae, N1,N2 = minutiae counts in two fingerprints. Dimensionless in [0,1]. Applies after alignment and matching.
FAR = FA / I FA = false accept count, I = number of impostor trials. Dimensionless.
FRR = FR / G FR = false reject count, G = number of genuine trials. Dimensionless.
EER point where FAR(threshold) = FRR(threshold). Dimensionless.
Worked examples
- PCA projection (small numeric example) Data: three 2-pixel face vectors (two pixels only, unit: pixel intensity): x1 = [2, 0]^T, x2 = [0, 2]^T, x3 = [3, 1]^T. Steps:
- Compute mean μ = (1/3)([2,0]+[0,2]+[3,1]) = [5/3, 1]^T.
- Centered: z1 = x1 - μ = [1/3, -1]^T, z2 = [-5/3, 1]^T, z3 = [4/3, 0]^T.
- Covariance C = (1/3)(z1 z1^T + z2 z2^T + z3 z3^T). Compute z1 z1^T = [[1/9, -1/3],[-1/3,1]], z2 z2^T = [[25/9,-5/3],[-5/3,1]], z3 z3^T = [[16/9,0],[0,0]]. Sum = [[(1+25+16)/9, (-1-5+0)/3], [(-1-5+0)/3, 2]] = [[42/9, -2],[-2,2]]. So C = (1/3)*[[14/3, -2],[-2,2]] = [[14/9, -2/3],[-2/3, 2/3]].
- Compute eigenvectors (sketch the algebra expected in exam): solve det(C - λI)=0; eigenvalues approximately λ1 ≈ 1.912, λ2 ≈ 0.310. Principal eigenvector u1 ≈ [0.882, -0.472]^T (normalized).
- Project x1: y1 = u1^T (x1 - μ) = u1^T z1 ≈ [0.882, -0.472]·[0.333, -1] ≈ 0.882*0.333 + 0.472 ≈ 0.294 + 0.472 = 0.765. Final: first principal coefficient ≈ 0.765 (in intensity units).
- Iris Hamming distance with mask Given two 8-bit iris codes and masks (1 = valid bit): c1=11001010, c2=10001110, mask m=11110111 (8 bits left-to-right). Compute XOR where mask=1.
- XOR = 01000100. Apply mask: masked XOR = 01000100 (since mask zeros only at 5th bit which is zero already). Count ones = 2. Sum mask bits = 7.
- HD = 2/7 ≈ 0.2857. Hamming distance = 0.2857 (dimensionless). If threshold 0.33, these match (genuine) because HD < threshold.
- Fingerprint minutiae score Set A has N1 = 6 minutiae, set B has N2 = 7. After alignment M = 5 matched minutiae.
- Matching score = 5 / ((6+7)/2) = 5 / 6.5 ≈ 0.7692. Score = 0.769 (77%).
Common mistakes
- Using Euclidean distance on high-dimensional raw face pixels without dimensionality reduction — leads to poor results and high computation.
- In iris matching, not applying the mask (counting occluded bits) — gives wrong Hamming distances.
- For fingerprint minutiae, matching without alignment or using too-tight spatial/angular tolerances causes false rejects; too-loose tolerances cause false accepts.
- Mixing up FAR and FRR definitions or reporting percentages without clarifying denominator.
- Ignoring rotational compensation when matching iris codes (no circular shifts), which inflates Hamming distances.
- Omitting minutia type or using inconsistent angle conventions (degrees vs radians) in fingerprint minutiae.
For your exam
Question types you will see: definitions (define PCA, Hamming distance, minutiae), short notes (steps of iris recognition, Daugman's rubber sheet), derivations (derive PCA covariance eigenproblem, derive LDA generalized eigenproblem), numericals (compute PCA projection, Hamming distance, matching score), and diagram questions (draw normalization mapping for iris, or block diagram of fingerprint matching pipeline).
What a full-marks answer includes:
- Precise definitions with bold-term names (e.g., PCA, Hamming distance).
- Correct equations and derivations: show mean subtraction, covariance matrix, eigen-decomposition for PCA; show S_B and S_W definitions for LDA and the Fisher criterion.
- For diagrams: label axes, show image → detected boundaries (iris) or image → thin ridges → minutiae points (fingerprint).
- For numericals: list given data, show each arithmetic step, units (pixels, dimensionless), and final bold numeric answer.
Quick check
- What is the purpose of the iris normalization (rubber sheet) step?
- Write the Hamming distance formula used for binary biometric codes with a mask.
- In fingerprint matching, what three numbers describe a minutia?
Answers: 1) To map the circular iris to a fixed-size rectangular coordinate system removing scale and pupil dilation; 2) HD = (Σ_i (c1_i XOR c2_i) · m_i) / (Σ_i m_i); 3) x-coordinate, y-coordinate, and ridge orientation θ.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?