Lymphatus / caesium-image-compressor

Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG, WebP and TIFF formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image.
https://saerasoft.com/caesium
GNU General Public License v3.0
3.31k stars 202 forks source link

Provide SSIM image (structural similarity index measure) to user #262

Open garywill opened 4 months ago

garywill commented 4 months ago

Is your feature request related to a problem? Please describe. Users are always uncertain about how big the difference is between the image before and after compression, how much the photo quality has decreased, and whether it has affected the preservation of key information in the photo.

Describe the solution you'd like Compute difference by SSIM algorithm (or something else) and provide SSIM image to user. ssim image example gif

Describe alternatives you've considered Butteraugli heatmap is also an alternative. But Butteraugli seems slow.

Additional context The example images are from https://stackoverflow.com/questions/56183201/detect-and-visualize-differences-between-two-images-with-opencv-python

SSIM https://en.wikipedia.org/wiki/Structural_similarity_index_measure

Butteraugli estimates the psychovisual difference between two images https://github.com/google/butteraugli

Guetzli implements butteraugli. Guetzli is a command-line app. open-source . Windows, macOS, and Linux versions of Guetzli are directly available https://github.com/google/guetzli

Lymphatus commented 4 months ago

That's an interesting one. Since the core library of Caesium is in Rust I was using DSSIM in my internal tests, but it only outputs a value and not the diff image which might not be ideal. I will experiment a bit with a couple of libraries. I would not use butteraugli though, because it's very slow and the project is archived.