PSNR and SSIM quality metrics
Measure selected differences or quality cues between images, or estimate quality without a reference.
Compare aligned images with the same numeric range.
A narrow vertical strip differs from the reference.
Orange pixels contain the error. Most of the image is unchanged; the map reveals where the scalar score came from.
These values are computed from the displayed 16 × 12 arrays. SSIM and other perceptual metrics use different definitions.
Aggregate the metric while preserving any useful spatial quality map.
Computed MSE and PSNR example. Scalar error metrics summarize a spatial difference; they do not explain perceptual quality by themselves.
Try it on an image
Experiment at pixel level
Compare equal-sized images. Preview shows the error map; scores appear below. The second upload is resized to match the input.
The engine loads on your first run. Your images stay in this browser.
Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.
Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Select a pixel
Select a pixel
When to use it
Compare reconstruction outputs when the metric’s assumptions match the task.
How it works
- 01Align the compared images and agree on range and channel meaning.
- 02Compute error statistics, local structure, gradient similarity or learned natural-scene features.
- 03Aggregate the metric while preserving any useful spatial quality map.
PSNR = 10 log10(peak² / MSE)
What to tune
PSNR requires the correct peak range; SSIM depends on local statistics. Report unknown pixels separately instead of treating them as correct.
Where it breaks down
A high score does not prove perceptual correctness or semantic fidelity. BRISQUE is a learned no-reference method and needs its model assets.
TypeScript API
Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.
All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.