A calibration and correction procedure for a fingerprint scanner. The calibration
and correction procedure performs an automatic calibration procedure and gray level
linearity procedure. The automatic calibration procedure includes a brightness
function to correct for distortions in brightness, a focus check function to identify
when the fingerprint scanner is out of focus, and a geometric distortion function
to correct for imperfect linearity in the geometry of the fingerprint scanner.
The gray level linearity procedure corrects for linear distortions in brightness
and contrast of gray levels.