I would like to compare 2 images similarity with percentage. I want to detect 90% same images. Each image size is 16x16 pixel. I need some clue, help about it. Right now i am able to detect 100% same images when comparing with the code below
for (; x < irMainX; x++)
{
for (; y < irMainY; y++)
{
Color pixelColor = image.GetPixel(x, y);
if (pixelColor.A.ToString() != srClickedArray[x % 16, y % 16, 0])
{
blSame = false;
y = 16;
break;
}
if (pixelColor.R.ToString() != srClickedArray[x % 16, y % 16, 1])
{
blSame = false;
y = 16;
break;
}
if (pixelColor.G.ToString() != srClickedArray[x % 16, y % 16, 2])
{
blSame = false;
y = 16;
break;
}
if (pixelColor.B.ToString() != srClickedArray[x % 16, y % 16, 3])
{
blSame = false;
y = 16;
break;
}
}
y = y - 16;
if (blSame == false)
break;
}
For example i would like to recognize these 2 images as same. Currently the software recognizes them as different images since they are not exactly same