Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I assume your are looking to get similar images. Hereby, I would not go into edge-detection for image similarities. Imho the typical approach would be a kind of "Bag (visual) of Words (BoW)" approach. It works as follows:

  1. You compute features at keypoints of your image-database.
  2. Cluster them ( i.e. build your vocabulary )
  3. Compute for each image a histogram of features ( i.e. compute nearest match to the vocabulary for each descriptor and count them ). This is your descriptor for an image
  4. The original approach would be learning based: Assign labels to your images and train a classifier with your labels and your descriptors. However, in your case this step could be simplified by just taking the nearest neighbors. So you'd match the descriptors of step 3 and take let's say the 10 nearest image-descriptors.

OpenCV provides a BoW class which basically does step 1-3 (you only need to chose which keypoint-detector and descriptor and matcher you need). If you are more interested why and how BoW works in detail, see for example http://people.csail.mit.edu/fergus/iccv2005/bagwords.html . If you google around you will probably also find examples for the complete realization with OpenCV.

Another approach which covers step 1-3 is to compute immediatly an image-descriptor without computing local features and cluster them. Maybe the GIST-Descriptor is worth looking into it: http://people.csail.mit.edu/torralba/code/spatialenvelope/ . Good luck!