ComparePicture

Pixel similarity vs perceptual similarity

Why two pictures can differ in every pixel and still look identical — and which measure to trust for which question.

Two pictures, two different questions

A pixel comparison asks: does position (x, y) hold the same colour in both pictures? A perceptual comparison asks: would a person looking at them see the same thing? The answers diverge all the time. Shift a photograph one pixel to the right and nearly every pixel changes, yet nobody could tell the two apart. Change the colour of a single small button and fewer than one percent of pixels change, yet it is the first thing a designer notices.

What each measure on ComparePicture is sensitive to

MeasureMoves a lot when…Barely moves when…
Changed pixels (mismatch %)anything shifts, even by one pixela change is smaller than the threshold
SSIMedges, texture or local contrast change; blurthe whole picture gets uniformly brighter
pHashthe composition changesthe picture is resized, recompressed or lightly edited
dHashgradients reverse or objects movecolours shift but light/dark structure stays
Histogram similaritythe colour mix changesobjects move around but keep their colours
Edge similarityoutlines are added, removed or movedonly colours or tones change
Visual content similaritythe subject or scene changesthe same scene is cropped, resized or regraded

Why alignment comes first

Both kinds of measure assume the two pictures are laid over each other correctly. When they are not — a screenshot captured after a scroll, a photo exported at a different size — a pixel diff reports everything as changed and SSIM collapses, while pHash and visual similarity, which look at each picture whole, stay high. That disagreement is itself informative: it is how the workspace knows to try alignment. Once B is placed where it belongs, the pixel and structural measures become meaningful again.

Which to trust

For QA, where any unintended change is a bug, trust the pixel diff with a small tolerance. For “is this the same photo?”, trust the perceptual hashes and, if you load it, visual similarity. For “did the edit damage detail?”, trust SSIM and the sharpness measures. The similarity view shows all of them at once so you do not have to choose in advance.