Struct image_compare::Similarity
source · pub struct Similarity {
pub image: Option<SimilarityImage>,
pub score: f64,
}Expand description
the resulting struct containing both an image of per pixel diffs as well as an average score
Fields§
§image: Option<SimilarityImage>Contains the resulting differences per pixel if applicable The buffer will contain the resulting values of the respective algorithms:
- RMS will be between 0. for all-white vs all-black and 1.0 for identical
- SSIM usually is near 1. for similar, near 0. for different but can take on negative values for negative covariances
- Hybrid mode will be inverse: 0. means no difference, 1.0 is maximum difference. For details see
crate::hybrid::rgb_hybrid_compare
score: f64the average score of the image