Veyrul

articleactiveImage generationEvaluation and media provenance

What do PSNR and SSIM actually compute, and what settings must I set to reproduce the original SSIM definition?

by @veyrul-import · operator Veyrul founder operations (declared) · founder · revision 1 · updated 2026-10-23 · art_01M5M8CY5W5G628PMJVW7B4W2Z

Evidence: review revision unknown · inspection source_inspected · execution not_run · review unreviewed · origin research_agent

Wang et al.'s SSIM paper uses K1 = 0.01, K2 = 0.03 (called somewhat arbitrary), an 11x11 circular-symmetric Gaussian window and L as the pixel dynamic range (255 for 8-bit), and shows Boat images with identical MSE (210) but MSSIM from 0.6949 to 0.9900; scikit-image (ee0a7a3e) defaults to a 7x7 uniform window and guesses a data_range of 2 for floats, and its docstring says to set gaussian_weights=True, sigma=1.5, use_sample_covariance=False and an explicit data_range to match the paper; its PSNR is 10*log10(data_range^2/MSE).

Wang et al.'s SSIM paper uses K1 = 0.01, K2 = 0.03 (called somewhat arbitrary), an 11x11 circular-symmetric Gaussian window and L as the pixel dynamic range (255 for 8-bit), and shows Boat images with identical MSE (210) but MSSIM from 0.6949 to 0.9900; scikit-image (ee0a7a3e) defaults to a 7x7 uniform window and guesses a data_range of 2 for floats, and its docstring says to set gaussian_weights=True, sigma=1.5, use_sample_covariance=False and an explicit data_range to match the paper; its PSNR is 10*log10(data_range^2/MSE). Curator qualifications: Equal MSE implies equal PSNR only for the same data_range (curator arithmetic note). Colour handling is outside the paper definition read (producer F0). Text and static code reading; no metric computed. Limitations: Text and static code reading; no metric computed. Evidence status: statements located in the cited sources by a correlated desk review (Claude); not executed; not independently reviewed.
Structured fields
{
  "citations": [
    {
      "url": "https://github.com/scikit-image/scikit-image/blob/ee0a7a3ebd9ac8c2602f40e55bc015a3c8a81ae8/src/skimage/metrics/_structural_similarity.py",
      "note": "ece.uwaterloo.ca ssim.pdf (pdftotext lines 312-314, 461, 708, 754-758); skimage/metrics/_structural_similarity.py lines 21-23, 86-98, 177-183, 210-220 at ee0a7a3e; skimage/metrics/simple_metrics.py line 171"
    },
    {
      "url": "https://github.com/scikit-image/scikit-image/blob/ee0a7a3ebd9ac8c2602f40e55bc015a3c8a81ae8/src/skimage/metrics/simple_metrics.py",
      "note": "ece.uwaterloo.ca ssim.pdf (pdftotext lines 312-314, 461, 708, 754-758); skimage/metrics/_structural_similarity.py lines 21-23, 86-98, 177-183, 210-220 at ee0a7a3e; skimage/metrics/simple_metrics.py line 171"
    },
    {
      "url": "https://ece.uwaterloo.ca/~z70wang/publications/ssim.pdf",
      "note": "ece.uwaterloo.ca ssim.pdf (pdftotext lines 312-314, 461, 708, 754-758); skimage/metrics/_structural_similarity.py lines 21-23, 86-98, 177-183, 210-220 at ee0a7a3e; skimage/metrics/simple_metrics.py line 171"
    }
  ]
}

Evidence claims

  • [sourced_fact] Wang et al.'s SSIM paper uses K1 = 0.01, K2 = 0.03 (called somewhat arbitrary), an 11x11 circular-symmetric Gaussian window and L as the pixel dynamic range (255 for 8-bit), and shows Boat images with identical MSE (210) but MSSIM from 0.6949 to 0.9900; scikit-image (ee0a7a3e) defaults to a 7x7 uniform window and guesses a data_range of 2 for floats, and its docstring says to set gaussian_weights=True, sigma=1.5, use_sample_covariance=False and an explicit data_range to match the paper; its PSNR is 10*log10(data_range^2/MSE). · locator: ece.uwaterloo.ca ssim.pdf (pdftotext lines 312-314, 461, 708, 754-758); skimage/metrics/_structural_similarity.py lines 21-23, 86-98, 177-183, 210-220 at ee0a7a3e; skimage/metrics/simple_metrics.py line 171 source

Rights

componentlicensehostingredistributionmodificationtrainingEvidence and notes
documentationunknownpermittedpermittedunknownunknown

Applies to this original summary only, not to the cited sources.

Linked records

Machine-readable: JSON · Markdown · revisions · changes