Reputation: 83
I have a collection of more than 100 images. Although I am able to see the common patterns between all of them I was asked to write some kind of the script/program to check for similarities or degree of similarity between them.
All of the images are 255x255 in size. There are only two colors black and white. In the most cases images are composed of three primitive shapes:
This shapes in the most cases are in the same place on the images but in different sizes and shapes. For example squares appears in the corners of the image but in different sizes.
My question is : Is there any kind of the software that can give me a numerical value that would represent the degree of similarity between images?
Upvotes: 2
Views: 563
Reputation: 2883
You can compute these operations and match them:
Median filter / Erode / Dilate
Compute gradients of images (Scharr, Sobel) to extract strong patterns
Compute Hough lines transform or contours extraction on the result of 2
4a. Perform Mahalanobis distance on HU moments from the result of 3
4b. (Alternative) compute histograms and match them on results of 3
One of the best libraries so far is OpenCV (http://www.opencv.org), which is well documented (docs.opencv.org)
Upvotes: 3