Question

I was wondering how to create a fingerprint database. If fingerprints are stored as images, how do you compare images in a database, or create an image search engine like TinEye?

I know this is a big subject, but I'm just looking for a starting point. Can this be done using Python/Django libraries and MySQL?

Was it helpful?

Solution

The Python Imaging Library is probably the best library to get started on image processing with.

The library most commonly used for real time image processing (you don't need real time, but you can't go wrong with fast) is OpenCV. It has Python Bindings and built-in feature detection algorithms. See also this comparison.

For an overview of image comparison algorithms take a look at this question.

OTHER TIPS

OpenCV comes with a sample program that does what you are looking for. It's called find_obj.py. Pull it up in your editor and change:

surf = cv2.SURF(1000)

to

surf = cv2.SURF(100)

This should find lots of "inlier" points of interest in the negative of the fingerprint scan.

You can play around with a number of the variables and eventually find the best configuration for the sort of images you're comparing. It's also fairly straightforward to alter the sample to allow you to compare a single image against an entire directory.

I should point out that this will only be effective for the sort of digitized fingerprint scans used by law enforcement.

As a very simple approach you can crawl all images and compute a hash for each.

Later on, when user submits an image for a search, you compute a hash for that too and look for the same hash in your database.

However, this is really simplistic approach and will only work if searched for exact image copies. Ideally, each image should be converted to some simplified feature set (to have tolerance against different versions of the same image --- different formats, sizes, noise, etc.) used for comparison. For instance, it could be worth trying convert images (both crawled and submitted for search) to grayscale of 128x128 size and compute hash of that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top