Skip to main content

Module ssimulacra2

Module ssimulacra2 

Source
Expand description

SSIMULACRA2 metric calculation.

SSIMULACRA2 is a perceptual image quality metric that correlates well with human visual perception. Higher scores indicate better quality.

Score interpretation:

  • 100: Identical
  • 90: Imperceptible difference

  • 80: Marginal difference

  • 70: Subtle difference

  • 50: Noticeable difference

  • <= 50: Degraded

§Implementation

This module uses fast-ssim2 for SIMD-accelerated SSIMULACRA2 calculation. It provides significantly better performance than the reference ssimulacra2 implementation while producing identical results.

§ICC Profile Support

When comparing images with embedded ICC profiles, use calculate_ssimulacra2_icc to ensure accurate color space conversion before comparison. This is critical for:

  • XYB JPEGs from jpegli (which embed custom ICC profiles)
  • Wide-gamut images (Display P3, Rec.2020)
  • Any image with non-sRGB color space

Without proper ICC handling, scores can be off by 1-2 points at high quality levels.

Functions§

calculate_ssimulacra2
Calculate SSIMULACRA2 between two images.
calculate_ssimulacra2_icc
Calculate SSIMULACRA2 with ICC profile support.