+1  A: 

To start, I'd increase the contrast to 100% to get a pure black and white image (not greyscale).

nickf
+4  A: 
Randy
Thank you! I tried it too, but each line on the finger become two lines (because of the edge detection). However it may show at least the outer surface of the finger, so it can be removed. Seems I'll try that.
yuku
+4  A: 

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

Nils Pipenbrinck
Your image-fu is strong.
Randy
+2  A: 

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.

Joachim Kerschbaumer