Expand description
Respiratory rate from a motion energy / vertical displacement trace.
Pure spectral peak in the breath band (~0.1–0.5 Hz): demean → dense DFT power scan → residual-band SNR → optional parabolic refine → fail closed. No learned weights / training.
Functions§
- respiration_
rate_ from_ motion_ trace - Estimate respiration (breaths/min) from per-frame scalar motion (chest ROI mean, vertical optical-flow energy, …).
- spectral_
rr_ peak - Core spectral peak search in the respiratory band. Fail closed on low SNR.