Skip to main content

changed_fraction

Function changed_fraction 

Source
pub fn changed_fraction(
    a: &CapturedImage,
    b: &CapturedImage,
    tolerance: u8,
) -> f64
Expand description

Fraction (0.0–1.0) of pixels that differ between a and b by more than tolerance on any RGB channel. Differing dimensions count as fully changed (1.0); two empty frames are unchanged (0.0).