Page 1 of 1

compare with psnr metric

Posted: 2011-08-22T01:29:56-07:00
by jspark
Hi guys

I am using imagemagick for measuring psnr between antialiased rendered images.

recently i've compare two sets of images that only have different background colors.

let's see what happen

first, i've compare -metric psnr for white back ground image with bunny
Image
and
Image

they looks similar, but have some differences inside the object along with the shadows and edges.
when i 've compared two image, i've got PSNR value 37.6311

BUT when i've set the background color of image to blakc like followings
Image
and
Image

i've got PSNR of 45. 7287!!!

as you can see the difference between two comparisons are quit similar

Image
Image

and difference of output from imagemagick also indicate that area of rabbit in the image are identical, the images are only differs in background
Image

As i know PSNR value is focused on the difference(error) between two images, then why the psnr value has changed.

Isn't it bug? or bug of my knowledge?

Re: compare with psnr metric

Posted: 2011-08-22T01:42:41-07:00
by anthony
The problem is that the edge pixels are anti-aliased with the background. Different background, different colored edge pixels, slightly different, differences.

If you want to remove the effect of the background best idea is to always have the image layered on a fixed common background color.

I do not suggest using transparency, as you will still need to ensure all fully-transparent colors are fixed for proper comparison.

Re: compare with psnr metric

Posted: 2011-08-22T02:36:25-07:00
by jspark
Yes! that's true! The "difference" is actually changed!! Thanks! Anthony!