compare images with tolerance
Posted: 2013-08-19T03:31:11-07:00
Hi,
I want to compare images but with a user specified tolerance (ex. 20% diff is accepted). So what I have in mind is:
compare -verbose metric AE REF_IMAGE OUTPUT_IMAGE DIFF_IMAGE
The output looks like this:
OUTPUT_IMAGE PNG 598x484 598x484+0+0 8-bit DirectClass 25.5kb
REF_IMAGE PNG 598x484 598x484+0+0 8-bit DirectClass 25.5kb
Image:
Channel distortion: AE
red: 600
green: 600
blue: 600
all: 600
So the total image size in pixels is 598*484 and the number of diff pixels is 600 (extracted from "all"). And then dividing the diff by the total number pixels multiplied by 100 gives me the percentage of different region of the image. Is this a correct? Does "compare" offer this or better method?
Thanks.
I want to compare images but with a user specified tolerance (ex. 20% diff is accepted). So what I have in mind is:
compare -verbose metric AE REF_IMAGE OUTPUT_IMAGE DIFF_IMAGE
The output looks like this:
OUTPUT_IMAGE PNG 598x484 598x484+0+0 8-bit DirectClass 25.5kb
REF_IMAGE PNG 598x484 598x484+0+0 8-bit DirectClass 25.5kb
Image:
Channel distortion: AE
red: 600
green: 600
blue: 600
all: 600
So the total image size in pixels is 598*484 and the number of diff pixels is 600 (extracted from "all"). And then dividing the diff by the total number pixels multiplied by 100 gives me the percentage of different region of the image. Is this a correct? Does "compare" offer this or better method?
Thanks.