1 unstable release
0.1.0 | Jan 14, 2021 |
---|
#710 in Images
510 downloads per month
Used in 2 crates
1.5MB
340 lines
pixelmatch-rs
Pixel-level image comparison
Completely based on pixelmatch
.
let num_diff_pixels = pixelmatch(
im1,
img2,
diff,
None,
None,
Some(Options {
threshold: 0.1,
..Default::default()
}),
);
Implements ideas from the following papers:
- Measuring perceived color difference using YIQ NTSC transmission color space in mobile applications (2010, Yuriy Kotsarenko, Fernando Ramos)
- Anti-aliased pixel and intensity slope detector (2009, Vytautas Vyšniauskas)
Example output
expected | actual | diff |
---|---|---|
Command line
Pixelmatch comes with a binary that works with PNG images:
pixelmatch --threshold 0.1 image1.png image2.png output.png
Dependencies
~5.5MB
~70K SLoC