ColourSearch – a simple image search engine
A few weeks I randomly got interested in how you match images with other images. Having a very limited background in computer graphics I started reading some research papers on how to match images. One strategy that seemed to work pretty well for most people was a histogram based comparison. Given two histograms it is possible to calculate the distance, or correlation, between the histograms. The image with the lowest distance or highest correlation would be the best match. To try out my newly learnt knowledge I created a small application, ColourSearch, which given a directory calculates a histogram for each image and stores it in memory. In the GUI you can then pick a color to search and the application will find the best matching images using 4 different algorithms and present the result side by side.
A problem with the current implementation is that I have not found any way to index histograms, so when searching the input image needs to be compared to each image in the database (O(n) yay!). For larger datasets this would of course not be feasible, but at least the problem is easy to scale over several CPUs, so I can take advantage of all my cores.
You can find ColourSearch on GitHub (code in C#, works perfect under Mono!):
If you have any ideas on how indexing can be done or on more efficient matching algorithms I would be very interested in hearing them!