imeq-rs aims to quickly compare two images to see if they are the same image.

Build

Compiles to: target/release/imeq cargo build --release

Usage

``` USAGE: imeq

FLAGS: -h, --help Prints help information -V, --version Prints version information

ARGS: Sets the first image to use Sets the second image to use ```

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'

bash Time (mean ± σ): 1.0 ms ± 0.3 ms [User: 0.6 ms, System: 0.2 ms] Range (min … max): 0.6 ms … 4.0 ms 936 runs

hyperfine -w 3 'target/release/imeq images/baseline.jpeg images/baselinebyanother_name.jpeg'

bash Time (mean ± σ): 5.3 ms ± 0.4 ms [User: 7.3 ms, System: 2.2 ms] Range (min … max): 4.8 ms … 8.3 ms 384 runs

hyperfine -w 3 'target/release/imeq images/baseline.jpeg images/flipped.jpeg'

bash Time (mean ± σ): 90.5 ms ± 1.1 ms [User: 448.1 ms, System: 52.0 ms] Range (min … max): 89.1 ms … 94.0 ms 31 runs

hyperfine -w 3 'target/release/imeq images/baseline.jpeg images/modified.jpeg'

bash Time (mean ± σ): 112.5 ms ± 2.1 ms [User: 467.5 ms, System: 52.2 ms] Range (min … max): 110.4 ms … 121.6 ms 26 runs

Credits

Goat Image by Florian van Duyn

License

The MIT License (MIT). Please see License File for more information.