AI Glossary / Computer vision and multimodal AI / Beginner

Peak signal-to-noise ratio (PSNR)

Definition

Peak signal-to-noise ratio, or PSNR, is a logarithmic measure comparing the allowed peak signal range with the mean squared error between a test image and a reference. It is commonly reported in decibels, with higher values indicating lower squared error under the same comparison settings.

What it means

Despite its name, PSNR is often used to evaluate compression or reconstruction error, not just random sensor noise. It compares corresponding pixel values and summarizes their differences. This makes it straightforward and reproducible when the reference, value range and preprocessing are specified. It does not directly measure how natural, pleasing or useful an image looks. Two outputs can have similar PSNR and visibly different artifacts. Comparisons are most meaningful when the images depict the same content, are properly aligned and use consistent color and numerical conventions.

How it works

First subtract the reference and test values at each compared sample. Square those differences and average them to obtain mean squared error, or MSE. Then calculate PSNR = 10 log10(L²/MSE), where L is the specified signal range or peak value for the chosen convention. For unsigned 8-bit values spanning 0 to 255, L is commonly 255; for normalized values spanning 0 to 1, it is 1.
The range should describe the representation, not be casually replaced by the brightest observed pixel in each image. If MSE is zero, the images match exactly at the compared samples and the mathematical PSNR is positive infinity. Report channel handling and any cropping because they change the calculation.

Three practical examples

  • An image-compression experiment compares reconstruction errors at several file sizes.
  • A denoising benchmark compares processed images with corresponding clean references.
  • A software team checks whether a new image-processing implementation reproduces a reference output within an agreed numerical tolerance.

Think of it this way

Think of PSNR as a score for how closely a copy matches a reference's numbers. It can tell you that the numerical errors became smaller, much like checking deviations from a target measurement. It cannot decide whether an altered face looks natural or whether a faint defect remains visible. Those questions require evidence beyond the aggregate score.

Worked example

Suppose an 8-bit grayscale comparison has MSE = 100. Using L = 255 gives PSNR = 10 log10(65,025/100), approximately 28.13 dB. If another output has MSE = 25, its PSNR is approximately 34.15 dB. Reducing the MSE by a factor of four raises PSNR by about 6.02 dB.
If both images are consistently divided by 255, the squared errors also scale by 255² and using L = 1 gives the same PSNR. Scaling the pixels without updating the stated range produces an incorrect result. These illustrative values compare numerical fidelity; they do not establish a universal threshold for acceptable image quality.

Illustrative case study

In a fictional photo-platform test, engineers compare two compression settings on the same reference collection. One setting has a higher average PSNR but creates more noticeable ringing around text in several images. The team records both the numerical result and a targeted visual review, then checks readability for its intended use. It does not discard PSNR; it interprets the metric alongside the observed failure mode. This example shows why a useful benchmark needs a clear purpose and representative images rather than a single score treated as a complete quality verdict.

Common misconceptions and mistakes

A high PSNR does not prove that an image is perceptually excellent or factually faithful in every detail. Small spatial shifts can cause substantial pixel error even when two images look similar. Conversely, averaging away uncertain fine detail can improve squared error while producing a soft image. Comparing scores calculated with different ranges, color spaces, crops or channel weighting is misleading. Averaging image-level decibel scores is also not the same operation as pooling all squared errors first and converting once; the chosen aggregation should be stated.

Business use

Use PSNR when reference-based numerical fidelity is relevant, and document the protocol so others can reproduce the result. Include the reference set, preprocessing, range, channels and aggregation method. Pair it with metrics or human evaluations appropriate to the business task, such as text readability, structural quality or inspection accuracy. Examine difficult examples rather than relying only on an average. A benchmark should reveal whether important content survives the processing, not simply encourage optimization of a convenient number.

People also ask

Is a larger PSNR usually better?

It means lower MSE when the reference and comparison settings are the same. It does not settle every perceptual or task-quality question.

Can PSNR be calculated without a reference?

Standard PSNR needs a corresponding reference image or signal.

Is there one acceptable PSNR threshold?

No. Acceptability depends on the content, representation, processing task and intended use.

Check your understanding

An image is converted from 0-255 values to 0-1 values. Should a correct PSNR calculation automatically change?

Answer: No. If the reference, test values and signal range are all scaled consistently, the ratio L²/MSE stays the same.

Related terms

  • Mean Squared Error
  • Root Mean Squared Error
  • Image quality
  • Structural similarity (SSIM)
  • decibel
  • structural similarity
  • reference image
  • rate–distortion tradeoff
  • perceptual evaluation

Learn next

Learn MSE and logarithmic scales next. Then compare a blurred image, a shifted image and a compressed image against one reference, checking whether the ordering by PSNR matches the qualities that matter to the intended viewer.

More in Computer vision and multimodal AI

  • Path finding - Path finding is the process of finding a sequence of valid connections from a starting state to a destination.
  • Pattern grammar - A pattern grammar is a set of rules describing how simpler components can combine into structured patterns.
  • PDE / diffusion inpainting (Bertalmío) - PDE-based inpainting fills a selected missing or damaged image region using equations that propagate information from its surroundings.
  • Perception - distortion tradeoff - The perception - distortion tradeoff describes a tension in image reconstruction between matching an individual reference image according to a distortion...
  • Phase-based magnification - Phase-based magnification is a video-processing technique that makes small motions more visible by modifying temporal changes in the local phase of image...
  • Phase correlation - Phase correlation is a frequency-domain method for estimating the relative translation between two images.

Sources

scikit-image, official image metrics documentation and peak_signal_noise_ratio range parameter: https://scikit-image.org/docs/stable/api/skimage.metrics.html Primary documentation search excerpts consulted; full source and editorial review remain pending.

Previous: PDE / diffusion inpainting (Bertalmío) Next: Pearson correlation coefficient

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer