Reputation: 3312
I want to compare set of images with the given template/ideal image. All images are similar to template image, I want to compare the images and find out the percentage of similarity between the template & rest of images.
Is there any open source or third party software for doing it.
I want to mainly use C# .Net as the technology.
Upvotes: 4
Views: 17106
Reputation: 26
OpenCV is a competent image algorithm library. I'd recommend EmGuCV as a C#-wrapper: http://www.emgu.com/
Comparing images are quite tricky and you should be more specific in your question to get a good and specific answer. I'd guess you want to ignore things as different brightness levels, contrast and translation...
One simple way to look for an image within an image (if no rotation is applied) is to use the small image as a kernel and use convolution to get the best match(es) in the image. Threshold or apply a percentage scale (I recommend a non-linear) to the response and you have a decent filter.
Upvotes: 1
Reputation: 1507
There are several ways to compare two images but I tried this way to compare images with percentage and threshold value, it worked fine for me Simple image comparison in .NET
Upvotes: 0
Reputation: 1071
The most simple and straight forward way to compare two images is to generate and compare the checksum values of two images. But using this method, you cannot calculate the image difference in percentage.
So to do that, you have to do pixel based comparison which means you have to compare pixel by pixel and compute the difference in percentage by yourself. This approach is generally slow and memory intensive.
This Code Project Article explains both these approaches.
EDIT
Here is one more related SO-Thread
Upvotes: 1