Pixel-level image comparison
Completely based on [pixelmatch
][].
rs
let num_diff_pixels = pixelmatch(
im1,
img2,
diff,
None,
None,
Some(Options {
threshold: 0.1,
..Default::default()
}),
);
Implements ideas from the following papers:
| expected | actual | diff |
| --- | --- | --- |
| |
|
|
|
|
|
|
|
|
|
|
Pixelmatch comes with a binary that works with PNG images:
bash
pixelmatch --threshold 0.1 image1.png image2.png output.png