Skip to content

DiffImageStats

FieldWhat it counts
pixelsHow many pixels the frame holds.
coveredHow many of those at least one of the two pictures reaches.
unchangedPixels both cover and agree about.
changedPixels both cover and disagree about.
addedPixels only the second picture covers.
removedPixels only the first one covers.
ratioEverything that is not unchanged, as a share of covered.
distanceHow far apart two pixels are on average, over the pixels both cover.

The four counts add up to covered rather than to pixels. Two pictures one of which is wider and the other taller leave a corner of the frame neither of them reaches, and those pixels are nothing at all rather than pixels that agree.

Released under the MIT License