pub struct VisualDiff {
pub perceptual_similarity: f64,
pub pixel_diff_count: u64,
pub diff_regions: Vec<DiffRegion>,
pub expected: Option<Vec<u8>>,
pub actual: Vec<u8>,
pub highlighted: Vec<u8>,
}Expand description
Visual comparison result using perceptual hash
Per Shamir [19]: pHash more robust than SHA-256 for game frame comparison
Fields§
§perceptual_similarity: f64Perceptual similarity (0.0 to 1.0)
pixel_diff_count: u64Pixel-level difference count
diff_regions: Vec<DiffRegion>Highlighted regions that differ
expected: Option<Vec<u8>>Expected image data (if available)
actual: Vec<u8>Actual image data
highlighted: Vec<u8>Diff overlay image
Implementations§
Trait Implementations§
Source§impl Clone for VisualDiff
impl Clone for VisualDiff
Source§fn clone(&self) -> VisualDiff
fn clone(&self) -> VisualDiff
Returns a duplicate of the value. Read more
1.0.0 · 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 VisualDiff
impl RefUnwindSafe for VisualDiff
impl Send for VisualDiff
impl Sync for VisualDiff
impl Unpin for VisualDiff
impl UnsafeUnpin for VisualDiff
impl UnwindSafe for VisualDiff
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