Search code examples
imagecomparisonopencvssim

Psychovisual image similarity algorithm/library


I'm looking for an algorithm (ideally a C/Rust implementation) that calculates perceived similarity between two images, taking into account psychovisual factors (e.g. that difference in chroma is not as bad as difference in brightness).

I have original image and multiple variations of it (256-color quantisations in my case) and I'd like algorithm to find which image a human would judge as the best one.

The best I've found so far is SSIM, but it doesn't "understand" dithering (error diffusion) and implementation uses linear RGB (I've fixed that by implementing my own).

Alternatively, it could be algorithm that preprocesses images for comparison with SSIM/PSNR/MSE or other typical algorithm.


Solution

  • I've ended up implementing it myself: DSSIM.

    There is also Butteraugli algorithm.