Comparing compression in different formats: Difference between revisions
No edit summary |
No edit summary |
||
Line 30: | Line 30: | ||
[[File:All methods ssim comparison plot.png|frame|File size against SSIM. Quality parameter is labeled on each data point. ]] | [[File:All methods ssim comparison plot.png|frame|File size against SSIM. Quality parameter is labeled on each data point. ]] | ||
<br clear=all> | <br clear=all> | ||
=== Comparing formats at SSIM 0.77 === | |||
<gallery mode="slideshow"> | |||
Image:Baseline image.png|Uncompressed baseline image | |||
Image:Ecw ssim077 q986.png|ECW quality 98.6 | |||
Image:Webp ssim077 q05.png|WEBP quality 5 | |||
Image:Jpeg ssim077 q10.png|JPEG quality 10 | |||
</gallery> | |||
=== Comparing formats at SSIM 0.9 === | === Comparing formats at SSIM 0.9 === | ||
Line 37: | Line 45: | ||
Image:Webp ssim09 q35.png|WEBP quality 35 | Image:Webp ssim09 q35.png|WEBP quality 35 | ||
Image:Jpeg ssim09 q25.png|JPEG quality 25 | Image:Jpeg ssim09 q25.png|JPEG quality 25 | ||
</gallery> | |||
=== Comparing ECW q89 to q90 === | |||
The ECW format has an interesting dip in SSIM from q89 to q90. Comparing the two images, it seems that significant noise is introduced at q90. File size does not change much. | |||
<gallery mode="slideshow"> | |||
Image:Baseline image.png|Uncompressed baseline image | |||
Image:Ecw q89.png|ECW quality 89 | |||
Image:Ecw q90.png|ECW quality 90 | |||
</gallery> | </gallery> |
Revision as of 19:11, 22 June 2022
This is a comparison of a small selection of compression methods used in georeferenced raster imagery. The intention is to find which method gives the best "bang for buck" - the best quality for the smallest file size. The measure for quality is SSIM - structural similarity index , which is a perception-based model to calculate the difference between two images.
Method
We compare a lossless baseline image to a compressed image and measure the SSIM using Python package scikit-image. This is repeated with a range of quality values for the compressed images. This should give an indication of which method is most efficient. In addition, it will indicate the quality value which will achieve the same SSIM across the compression methods.
Note that each of the file formats use a different scale for the input "quality" parameter. We include a wide range of the legal values from each of the formats, so this difference should not matter.
The baseline image has the following attributes:
Attribute | Value |
---|---|
File size | 273 MB |
Format | GeoTIFF |
Compression | LZW |
Dimensions | 10000 x 10000 px |
Pixel size | 0.25 meters |
Result
The graph shows that at high compression/low SSIM, the ECW format is easily the most effective. However, as SSIM increases, the three formats converge, and at around SSIM=0.9 the formats produce equally sized files.
Comparing formats at SSIM 0.77
Comparing formats at SSIM 0.9
Comparing ECW q89 to q90
The ECW format has an interesting dip in SSIM from q89 to q90. Comparing the two images, it seems that significant noise is introduced at q90. File size does not change much.