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
and
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
and
i've got PSNR of 45. 7287!!!
as you can see the difference between two comparisons are quit similar
and difference of output from imagemagick also indicate that area of rabbit in the image are identical, the images are only differs in background
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?
compare with psnr metric
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: compare with psnr metric
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: compare with psnr metric
Yes! that's true! The "difference" is actually changed!! Thanks! Anthony!