Skip to main content

compute_rmse

Function compute_rmse 

Source
pub fn compute_rmse(a: &[u8], b: &[u8]) -> f64
Expand description

Per-pixel RMSE (Root Mean Square Error) between two RGBA8 images.

Both buffers must have the same length (width * height * 4). Returns a value in the range [0.0, 255.0]:

  • 0.0 โ€“ images are byte-identical.
  • < 5.0 โ€“ visually indistinguishable (acceptance threshold).
  • > 50.0 โ€“ significant structural difference.

ยงPanics

Panics if a.len() != b.len() or if the length is zero.