A Rust library for calculating the similarity between two images.
toml
[dependencies]
image = "0.23.4"
rust
let image_a = image::open("image_a.png").unwrap();
let image_b = image::open("image_b.png").unwrap();
let difference = similarity_sad(&image_a, &image_b);
| Image A | Image B |
| --- | --- |
|
|
| SAD¹: | 0
| MAD¹: | 0.0
| SSD¹: | 0
| MSE¹: | 0.0
|
|
| --- | --- |
| SAD¹: | 13500834
| MAD¹: | 51.501595
| SSD¹: | 1179189332
| MSE¹: | 4498.2505
|
|
| --- | --- |
| SAD¹: | 16662881
| MAD¹: | 63.563847
| SSD¹: | 1680929909
| MSE¹: | 6412.239
|
|
| --- | --- |
| SAD¹: | 19903895
| MAD¹: | 75.92734
| SSD¹: | 1681425109
| MSE¹: | 6414.128
|
|
| --- | --- |
| SAD¹: | 46021705
| MAD¹: | 175.55887
| SSD¹: | 9046268163
| MSE¹: | 34508.773
|
|
| --- | --- |
| SAD¹: | 69718295
| MAD¹: | 265.9542
| SSD¹: | 20780685733
| MSE¹: | 79272.02
¹: The smaller the value, the more similar the images are. ²: The larger the value, the more similar the images are.