Choose a source, press Start, and sit or lie still.
The camera image is analysed in your browser and never leaves it.
A phone lying on the chest tilts a little with every breath, and a webcam sees the shoulders rise and fall. Either gives a waveform from which the app counts breaths and finds the breathing rate.
Phone: every breath tilts the phone, and the share of gravity on each of its three axes changes with the tilt. The app filters all three axes and their combined magnitude, keeps the one that swings most, removes the steady part, and smooths away anything faster than about one swing per second. Choose the axis yourself if the automatic choice jumps about.
Webcam: the image is analysed at 160 × 120 pixels. The rows of the box are averaged into one brightness value each, and the brightness-weighted mean row is the signal: when the shoulders rise on an in-breath, the bands of light and dark inside the box move up, and the number moves with them.
A breath is counted when the trace rises and then falls by more than half of its recent swing; two breaths closer than 1.5 s are taken as one. The breathing rate is 60 divided by the median of the last five breath intervals, so one odd breath does not move it much. The coefficient of variation is the standard deviation of the intervals divided by their mean: how regular the breathing is, regardless of how fast.
The spectrum is the Fourier transform of the last 30 s of the filtered trace. Regular breathing shows up as one peak, whose position is the breathing rate found a second way, from what repeats rather than from counting breaths. The shaded band is the resting range: resting adults breathe roughly 12–20 times a minute. With only 30 s of signal the peak is a few breaths per minute wide, as the window explorer app shows for sound. The two estimates agree when the breathing is regular and drift apart when it is not.
Sit quietly for two minutes and note the rate and the coefficient of variation. Then read a paragraph aloud and watch both change: speech makes the breaths short and uneven, because the in-breaths come where the sentences allow. Hum one long note for as long as you can and see a single slow breath appear in the trace.
Listen to a slow piece and then a fast one, three minutes each, and compare. Finally, measure the same person with both sources at once (the phone on the chest, the laptop camera on the shoulders) and compare the two rates and traces: they measure the same breathing in two ways and should agree, but not perfectly.
The app measures the motion of the chest or belly, not the air that moves in and out, so a shallow breath and a deep one can look alike, and a shift of posture can look like a breath. The person must sit or lie still; walking, gesturing and laughing all swamp the signal. Breaths shorter than 1.5 s are not counted, and the first few seconds after Start are unreliable while the filters settle. This is a classroom device, not a medical one: fine for comparing conditions within one person, poor at comparing people.