pub struct VisualSimilarity {
pub dhash_similarity: f64,
pub ahash_similarity: f64,
pub phash_similarity: f64,
pub whash_similarity: f64,
pub histogram_similarity: f64,
pub ssim: f64,
pub feature_matches: usize,
}Expand description
Visual similarity metrics.
Fields§
§dhash_similarity: f64Difference hash similarity
ahash_similarity: f64Average hash similarity
phash_similarity: f64Perceptual hash similarity
whash_similarity: f64Wavelet hash similarity
histogram_similarity: f64Histogram similarity
ssim: f64SSIM score
feature_matches: usizeNumber of feature matches
Implementations§
Source§impl VisualSimilarity
impl VisualSimilarity
Sourcepub fn overall_score(&self) -> f64
pub fn overall_score(&self) -> f64
Calculate overall similarity score.
Sourcepub fn is_similar(&self, threshold: f64) -> bool
pub fn is_similar(&self, threshold: f64) -> bool
Check if images are similar above threshold.
Trait Implementations§
Source§impl Clone for VisualSimilarity
impl Clone for VisualSimilarity
Source§fn clone(&self) -> VisualSimilarity
fn clone(&self) -> VisualSimilarity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VisualSimilarity
impl RefUnwindSafe for VisualSimilarity
impl Send for VisualSimilarity
impl Sync for VisualSimilarity
impl Unpin for VisualSimilarity
impl UnsafeUnpin for VisualSimilarity
impl UnwindSafe for VisualSimilarity
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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