Hi all,
I am newbie to imageMagick. I have a requirement to verify that image present in my application or not. For this I am taking the screenshot of my app then I have to check in captured app screenshot, contains a particular image or not which I can pass a expected image. Using rmagick, it is giving output as an image with highlighted area that is matched but instead of getting output as an image I want output in percentage format means how much percentage it was matched. Hope, I am able to clarify my query.
Image1(parent image, whole app screen shot)
Image2(child image, small image which will be present in parent image )
If image2 present in image1 then output 100% matched
Matching image with another image and get result in percentage format
Matching image with another image and get result in percentage format
Last edited by rkn on 2015-03-13T22:00:17-07:00, edited 2 times in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Matching image with another image and get result in percentage format
"Compare" gives a score in the range 0 to 1. A script could multiply by 100. See http://www.imagemagick.org/script/compare.php
snibgo's IM pages: im.snibgo.com
Re: Matching image with another image and get result in percentage format
Sorry with this necrobumping action, I have had this same doubt than the user forum. Snibgo when you said this:
""Compare" gives a score in the range 0 to 1. A script could multiply by 100."
In the link you gave I dont understand exactly what did you mean, could you explain that quote posted earlier please?
This part form the link:
"-> compare -channel red -metric PSNR rose.jpg reconstruct.jpg difference.png
19.63"
That 19.63 what does it mean? is the percentage or is some kind of value?
thanks!
""Compare" gives a score in the range 0 to 1. A script could multiply by 100."
In the link you gave I dont understand exactly what did you mean, could you explain that quote posted earlier please?
This part form the link:
"-> compare -channel red -metric PSNR rose.jpg reconstruct.jpg difference.png
19.63"
That 19.63 what does it mean? is the percentage or is some kind of value?
thanks!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Matching image with another image and get result in percentage format
There are different metrics. See http://www.imagemagick.org/script/comma ... php#metric . Some (eg RMSE) have a scale from zero to one, where one means a perfect match and zero means as different as possible. For those, multiply by 100 to get a percentage.
The PNSR metric has a scale from zero to infinity, where infinity is a perfect match and again zero means as different as possible.
The PNSR metric has a scale from zero to infinity, where infinity is a perfect match and again zero means as different as possible.
snibgo's IM pages: im.snibgo.com