Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the background from a fingerprint image?

I have a fingerprint image taken from a sliding scanner. However the output does not have clean background. It looks like this:

dirty http://img208.imageshack.us/img208/2622/dirtyie0.png

I want to remove the background so that further processing will be more accurate. Something like this:

cleaned http://img515.imageshack.us/img515/7530/cleanhh6.png

How to do that? What image processing technique (if any) can be used? Thank you.

like image 217
Randy Sugianto 'Yuku' Avatar asked Oct 22 '08 05:10

Randy Sugianto 'Yuku'


3 Answers

You can check the frequency spectrum for the area around the pixels. The less high frequency components you have, the more likely it is that the pixel is part of the background.

The most sophisticated way to do that would be to run a FFT of a block of pixels and check the spectrum directly. Since finger prints have a distinct frequency spectra it should be easy to separate background from fingerprint that way.

Using Wavelets could also be worth a try. That lets you split the image into sub-bands of the frequency of interest directly. Finding a good wavelet requires lot of practice though.

If you want a non-overkill solution it may be fine if you run a high-pass filter of the image and use it for a simple mask-finding pass. Here's a rough outline how that works:

  1. normalize the image: darkest pixel becomes -1, lightest pixel becomes 1. You can also use -128 / 127 if you prefer to work with bytes.

  2. run a gaussian blur over the image. Experiment with the radius.

  3. subtract the normalized image from the blured image. Handle overflows by saturating to -1 and 1. The image will now roughly look like it was edge-detected, but with shades of gray instead of a binary mask.

  4. Run a mask-pass over the image from step 3. The higher the absolute value of each pixel, the higher the chance that it is part of the fingerprint. You can generate a mask by choosing a good threshold value.

  5. use the mask to prepare your source-image.

For completes sake you can also do it with image morphology:

  1. Run a edge-detector on your image. Using the Canny detector is a good choice but a simple 3x3 edge-detector kernel would work as well.

  2. Run multiple dilation passes on the edges. This will at each pass grow a border around all white pixels and make the edges thicker. Do this until all the area of the finger-print is covered with white pixels. In your example I think 4 or 5 passes are enough.

  3. You can now directly use the dilated image as a mask.

Link: Dilation http://homepages.inf.ed.ac.uk/rbf/HIPR2/dilate.htm

like image 196
Nils Pipenbrinck Avatar answered Nov 18 '22 19:11

Nils Pipenbrinck


You might try an edge detection filter. That would help remove the background noise, and might sharpen up the fingerprint features for the rest of the processing.

Canny edge detector might be a good one to try first. There's even a free web implementations you can try and a public-domain Java implementation available.

EDIT: Was curious how it would work, so I tried the web implementation on default settings -- not too bad. It does seem to come up with a few "phantom" features in there, but overall it looks a bit easier to process.

alt text http://img356.imageshack.us/img356/5/ml00055edgedetectionwp7.png

like image 41
Randy Avatar answered Nov 18 '22 17:11

Randy


try some contrast enhancement (e.g. mexican hat) and after that some advanced enhancement. we had good results when using Gabor-filter techniques to improve CT images of boles for dendrochronology. we used gabor filter because they are widely used withing fingeprint matching systems and our images were somewhat similar. after that all you have to do is some (i'd suggest locally adaptive) tresholding, and you got your binary image.

like image 2
Joachim Kerschbaumer Avatar answered Nov 18 '22 19:11

Joachim Kerschbaumer