Is there a way to measure how much an image differs from compared image ?
Hello,
I have two images say A and B.
There is a baseline image say Z.
I want to compare A with Z and find out how much A differs from Z. ( like in percentage or particular number)
then I want to compare B with Z and find out how much B differs from Z.
My requirement is not know which image ( A or B ) is more similar to Z.
I am using JavaScript.
Is there a way to this in Test Complete?
Any help is appreciated.
Regards,
Rushikesh Kadam.
Based on the images provided...
Do some math to determine the center of the image. Using the Pixels function, which is a method of Picture (https://support.smartbear.com/testcomplete/docs/reference/program-objects/picture/pixels.html?q=pixels), retrieve the color at the middle. If it's your shade of blue, it's pinned. If it's that shade of gray, it's unpinned.
Retrieving the amount of red is a similar process. You're going to loop through each pixel in the image and if the pixel color is red, increment a red counter. It's not elegant, but it'll get the job done.
I think your best bet is to test for blue or gray.