I am doing a paper review about 'Non-Contact Video-Based Estimation Of Physiological Parameters: A Review'.
It is not finished at all, but I can copy/paste a piece of text about breath information.
Poh et al. [96], explored the possibility to
measure Hear Rate (HR) from face videos recorded by a webcam.
They detected the region of interest (ROI, i.e. the face
area) using Viola-Jones face detector and computed the
mean pixel values of the ROI of each frame from three
color channels. Then, Independent Component Analysis
(ICA) was applied to separate the PPG signal from the
three color traces, and the PPG signal was transferred
into frequency domain to find the frequency with the max
power within the range of [0.7, 4] Hz as the HR frequency.
Indeed, ICA had previously been used to reduce motion
artifacts in PPG measurements [124], [125]. According to
previous findings [120], the green channel trace contains
the strongest plethysmographic signal among the three
color channels. Poh’s results showed that comparing to
the raw green trace, ICA separated sources can achieve
higher accuracy for measuring HR.
Later on, Poh et al. [97] extended their original work
in order to estimate respiratory rate, which was estimated
with a well-known indirect method [126] based on heart
rate variability (HRV). The peaks of the PPG waveform
(corresponding to the dominant ICA component) were
identified to derive a time series of inter-beat intervals.
Respiratory rate estimation from HRV works well in
healthy young volunteers, but is much less likely to
give accurate results in elderly subjects, especially those
with chronic diseases, most of which depress autonomic
function [127].
However, breathing is associated with
movement of the upper thorax and regions of the face.
The changes in the amplitude of the PPG waveform caused
by breathing-synchronous motion can be extracted though
band-pass filtering and spectral analysis [112].
Respiratory rate can also be estimated directly through motion-tracking
techniques. Eulerian video magnification techniques can
be used to track and amplify the motion-related changes
caused by breathing in the videos of human subjects,
including neonates, recorded under normal lighting conditions
[100].
...
...
Westphal et al. [128] examine abilities and
limitations of the aforementioned algorithm proposed by
Wu et al. [100]. More specifically, this study investigates
the influence of varying ambient light as well as the
influence of movements of the measuring objects on the
results. Reliable results are strongly dependent on the right
environmental conditions. Good results are obtained if
the ROI is nearly free of movements. However, particular
movements of the subject have a greater influence on the
accuracy. The effect of varying ambient light was found to
have no significant influence on the accuracy of the result.
[96] M.-Z. Poh, D. J. McDuff, and R. W. Picard, “Non-contact,
automated cardiac pulse measurements using video imaging and
blind source separation,” Optics express, vol. 18, no. 10, pp.
10 762–10 774, 2010.
[124] J. Yao and S. Warren, “A short study to assess the potential of
independent component ... (more)
About "motempl.c example program" it's now in opencv contrib