mapbox / pixelmatch

The smallest, simplest and fastest JavaScript pixel-level image comparison library
ISC License
6.15k stars 305 forks source link

Weird comparator behaviour. #127

Open KuznetsovRoman opened 1 year ago

KuznetsovRoman commented 1 year ago

Example 1

Image1

Image1

Image2

Image2

With threshold: 0.15 (default is 0.1) Pixelmatch can't see the difference between these images

Example 2

Image3

Image3

Image4

Image4

With the same threshold: 0.15 (default is 0.1) Pixelmatch can see the difference between these images:

Image4

Showcase repo: https://github.com/KuznetsovRoman/pixelmatch-showcase

And there is no suitable threshold value. Here is visual color comparison table:

color difference table

DudaGod commented 1 year ago

cc @mourner