imeq-rs aims to quickly compare two images to see if they are the same image.
Installation
cargo install imeq
Usage
USAGE:
imeq <IMAGE_1> <IMAGE_2>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<IMAGE_1> Sets the first image to use
<IMAGE_2> Sets the second image to use
Building
Compiles to: target/release/imeq
cargo build --release
Benchmark
The below benchmarks have been done on a 2020 M1 Mac Mini with 16gb of ram and 256gb ssd, hyperfine -w 3 is used and that command is then ran 3 times (outside of -w 3) and the result of the third run has been noted.
baseline.jpeg and baseline_by_another_name.jpeg should be identical, apart from the name.
flipped.jpeg has been flipped horizontally.
modified.jpeg has been modified so that the very last (bottom right) pixel is red.
hyperfine -w 3 'target/release/imeq images/baseline.jpeg images/baseline.jpeg'
)
)
hyperfine -w 3 'target/release/imeq images/baseline.jpeg images/baseline_by_another_name.jpeg'
)
)
hyperfine -w 3 'target/release/imeq images/baseline.jpeg images/flipped.jpeg'
)
)
hyperfine -w 3 'target/release/imeq images/baseline.jpeg images/modified.jpeg'
)
)
Credits
Goat Image by Florian van Duyn
License
The MIT License (MIT). Please see License File for more information.