Closed rcanavan closed 7 years ago
Can you attach an example image? What platform are you running on?
I'm using Ubuntu 16.04 x64 with libpng12-0 1.2.54-1ubuntu1. The test images were generated with xv 3.10a+patches and imagemagick 7.0.2-1 and re-scaled to various sizes using convert -resize ??x??
.
15x15:
1x1:
Probably fixed in 4f9b12106e35bb3f1b9382dd064dece3a3f3f365
Fixes the crash, but dssim when comparing an image with a single black pixel and an image with a single white pixel is 0.00000000. I've also tested a 2x2 black and white checkerboard against its inverse or a red and green checkerboard - both return 0.00000000. That doesn't seem right.
convert xc:black b.png
convert xc:white w.png
dssim b.png w.png
0.00000000 w.png
SSIM is not meaningful for a single pixel. This implementation uses blur, so it's also doing poorly for sizes smaller than the blur radius. Try with at least 8x8 pixels.
When used with any image with width or height less than or equal to 15, dssim fails with an Assertion: