Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compare different size images

Tags:

c#

I am having an issue while comparing two images which are same. if the image sizes are same then can compare (No issues), if sizes are different, then I am unable to compare. I am comparing pixel by pixel.

Is there any way in C#.net to compare similar images like can match around 70%.

Thanks

Laxman

like image 957
laxman digari Avatar asked Sep 16 '11 04:09

laxman digari


1 Answers

You need to calculate and compare perceptual hash of both the images.

Read the following article and implement it in C# https://www.memonic.com/user/aengus/folder/coding/id/1qVeq

OR

You can use Exhaustive Template Matching class of AForge to compute image similarity

The class also can be used to get similarity level between two image of the same size, which can be useful to get information about how different/similar are images:

like image 140
Muhammad Hasan Khan Avatar answered Sep 30 '22 18:09

Muhammad Hasan Khan