pub struct Similarity {
pub image: 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: 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: f64
the average score of the image
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Similarity
impl RefUnwindSafe for Similarity
impl Send for Similarity
impl Sync for Similarity
impl Unpin for Similarity
impl UnwindSafe for Similarity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more