Skip to main content

respiration_from_motion

Function respiration_from_motion 

Source
pub fn respiration_from_motion(
    vert_motion: &[f32],
    fps: f32,
) -> Result<(f32, f32), CvError>
Expand description

vert_motion per-frame vertical motion scalar. Estimate breaths/min in ~6–30 band.

Returns (breaths_per_min, confidence). Fails closed on short/noisy traces (default SNR gate inside the spectral estimator).