pub fn coverage(img: &CaptureImage, bg: [u8; 4], eps: u8) -> f32
Fraction of pixels whose RGB differs from bg by more than eps on any channel — “how much of the frame is lit” (0.0..=1.0). Alpha is ignored.
bg
eps
0.0..=1.0