Abstract
Out-of-hospital cardiac arrest (OHCA) is recognized as a global mortality challenge, and digital strategies could contribute to increase the chance of survival. In this paper, we investigate if cardiopulmonary resuscitation (CPR) quality measurement using smartphone video analysis in real-time is feasible for a range of conditions. With the use of a web-connected smartphone application which utilizes the smartphone camera, we detect inactivity and chest compressions and measure chest compression rate with real-time feedback to both the caller who performs chest compressions and over the web to the dispatcher who coaches the caller on chest compressions. The application estimates compression rate with 0.5 s update interval, time to first stable compression rate (TFSCR), active compression time (TC), hands-off time (TWC), average compression rate (ACR), and total number of compressions (NC). Four experiments were performed to test the accuracy of the calculated chest compression rate under different conditions, and a fifth experiment was done to test the accuracy of the CPR summary parameters TFSCR, TC, TWC, ACR, and NC. Average compression rate detection error was 2.7 compressions per minute (±5.0 cpm), the calculated chest compression rate was within ±10 cpm in 98% (±5.5) of the time, and the average error of the summary CPR parameters was 4.5% (±3.6). The results show that real-time chest compression quality measurement by smartphone camera in simulated cardiac arrest is feasible under the conditions tested.
1. Introduction
With a yearly number of out-of-hospital cardiac arrest (OHCA) incidents around 370,000-740,000 in Europe alone, and a low average survival rate of 7.6 % [1], OHCA is recognized as a major mortality challenge [2]. The time from collapse to care is crucial and there is a high focus on low response times of emergency medical services (EMS) [3]. A majority of EMS treated OHCAs are witnessed [4], and quality cardiopulmonary resuscitation (CPR), until EMS arrives, can have positive effects on survival [5–7]. The witness is often in close relation with the patient and could experience the situation as extremely stressful [8]. Studies have shown that telephone-assisted CPR (T-CPR) has a positive effect by getting more callers to start CPR and coaching callers to provide quality CPR [9–11]. Furthermore, CPR feedback has been shown to improve CPR quality [12–15]. Combining T-CPR with CPR feedback may improve CPR quality and survival from OHCA.
In the recent statement from the America Heart Association (AHA), the use of digital strategies to improve healthcare in general and to document its effect is encouraged [16, 17]. Devices providing the bystander with CPR quality measurement by utilizing an accelerometer to measure CPR metrics are available [18–20]. A challenge with these devices is to get the users to carry it with them at all times. Smartwatches has a built-in accelerometer, and has been suggested as a tool for measuring CPR metric [21–23]. However, a very small percentage of the population wears a smartwatch at all times. The smartphone, on the contrary, is a digital device most people carry with them. In recent years, smartphone applications have been developed for CPR quality measurement and to support learning [24, 25] and to help communicate the location of an emergency [26]. In addition, there are publications describing the use of the accelerometer in smartphones to measure CPR metrics [25, 27–30]. Smartphone solutions utilizing the accelerometer require the smartphone to be held on the patient's chest or strapped to the bystander's arm while performing CPR. These solutions may be more suited for training than for actual emergencies since buttons causing phone connection interruptions with the emergency unit can accidentally be pressed when performing the compressions.
Our research group has earlier presented an application, QCPR cam-app 1.0, utilizing the smartphone camera to estimate the chest compression rate and provide feedback to both the bystander and the dispatcher while the phone is placed flat on the ground [31]. Besides from a small offline study by Frisch et al. [32] we have found no other published work or products that utilize the smartphone camera when measuring compression rate. QCPR cam-app 1.0 demonstrated accuracy issues when challenged with bystanders having long loose hair and in cases of people moving around the emergency scene. In this paper, we present test results of QCPR cam-app 2.0, improved to handle this, but also to provide more information by calculating a CPR summary report after CPR has ended. These parameters can be used to evaluate each session and to generate data that can be used for dispatcher-caller quality improvement and research.
2. Materials and Methods
The application, QCPR cam-app 2.0, captures CPR movements utilizing the smartphone camera while the smartphone is placed flat on the ground next to the patient. From the detected motions, the algorithm estimates the chest compression rate and hands-off time and provides: (1) real-time objective feedback to the bystander, (2) real-time objective feedback to the dispatcher during the emergency call, and (3) a CPR summary report.
2.1. Illustration of Bystander and Dispatcher Use
An illustration of the application in use can be seen in Figure 1, with screenshots in Figure 1. By clicking the emergency button, the application activates speaker mode, establishes telephone connection with the dispatcher and sends GPS location and real-time compression data to a web server available for the dispatcher. The bystander then places the smartphone at the opposite side of the patient, see Figure 1. The preview frames from the front camera are shown to the bystander, allowing him to position himself and to keep track of the ongoing activity in the field of view of the camera (Figure 1). A speedometer is displayed next to the preview frame allowing the bystander to keep track of the applied compression rate.
A live sequence example of the proposed web server solution monitored by the dispatcher is shown in Figure 1. A 20 seconds sliding window providing the development and history of the compression rate in real-time is shown, where different colors are used to make the interpretation easier. Green dots correspond to compression rates in the desired range of 100–120 cpm and yellow outside. Above the graph, a circular color indicator provides information about the certainty of the reported compression rates. If the detections are carried out in low noise, the indicator is green, but if high noise conditions are present, i.e., some cases of long loose hair and from large disturbances, the indicator shifts to yellow. The bystander's GPS location is provided to the dispatcher, as seen in Figure 1.
2.2. Technical Description
QCPR cam-app 2.0 was designed to handle the disturbance issues observed in QCPR cam-app 1.0, [31] and the technical description of the improvements are presented in more detail in the appendix. In short; All the estimations are performed on the smartphone, and the main steps in detection of compression rate are illustrated in Figure 2. In step 1, difference frames, g(i, j), are generated by thresholding the differences between subsequent input frames, f(i, j), from the camera. A dynamic region of interest (ROI) is established from the largest connected moving object and is updated each half second by checking the activity in the blocks around the ROI boundary. By using a dynamic ROI, we allow others to move around in the emergency scene without disturbing the detections. In step 2, we generate a signal, d(l), from the activity in the ROI and for each half second, timestep n, a short time Fourier transform (STFT) is performed on the three last seconds of d(l). A sliding Hanning window is applied to d(l) prior to the STFT. In step 3, the power spectrum density, D n(ω), found from the STFT is studied and a decision three is used to separate compression rates from noise. The decision three recognizes a system in the D n(ω) for cases of bystanders with long loose hair, thus solve the detection issues observed in QCPR cam-app 1.0 [31] for these cases. If a CR(n) is detected, it further undergoes some postprocessing steps, indicated in step 4, Figure 2. These steps filter out and suppress noise by performing smoothing and removing short detection pauses caused by compression stops or disturbances. In step 5, the detected and filtered compression rate, CRf(n) (cpm), is displayed on the smartphone and sent to the web server and displayed to the dispatcher, providing the real-time feedback to both bystander and dispatcher.
2.3. CPR Summary Report
After completion of a caller session, a set of CPR summary parameters are calculated by QCPR cam-app 2.0. The parameters, which are both shown on the smartphone screen for the bystander and saved on the web server for the dispatcher, are as follows:
TFSCR (s): time from start of phone call to start of first stable compression rate. A compression rate is defined as stable if CRf(n) > 40 and |CRf(n) − CRf(n − 1)| < 20 is true for at least 6 seconds.
TC (s): total active compression time. The time where CRf(n) > 0, for t(n) > TFSCR, and continuously for more than 2 s.
TWC (s): time without compressions. TDPC-TC, where TDPC (s) is the duration of the phone call.
ACR (min −1): average compression rate. An average of all CRf(n) > 0, for t(n) > TFSCR, and continuously for more than 2 s.
NC: total number of compressions. Estimated by: ACR ∗ (TC/60).
2.4. Data Material and Evaluation Measures
All experiments were performed on a Resusci Anne QCPR manikin. The QCPR cam-app 2.0 algorithm was implemented in Android Studio and the experiments were performed with a Sony Xperia Z5 Compact (Sony, Japan). A reference signal for the compression rate was provided by an optical encoder embedded in the Resusci Anne QCPR. A three-second long sliding window frequency analysis was performed on the signal each half second, providing the reference data, CRtrue(n), with the same sample rate as the compression rate detection, CRf(n), from the app.
To evaluate the results, different measurements were used: Average error (), Performance (P), Relative error parameter (REpar) and Bland Altman plots used to visualize the agreement between data provided by QCPR cam-app 2.0 and the reference data provided by Resusci Anne QCPR manikin. is given in compressions per minute (cpm) and is the average error of the sequence, defined as
(1) |
where N is the number of samples of the sequence. For sequences containing discontinuity in the reference data, i.e., 30 : 2 session, we allowed errors in a ±1 s interval around the automatically detected discontinuities. This reduced the influence of insignificant delays on the error measure. P is defined as the percentage of time where |CRf(n) − CRtrue(n)|<Δ. According to guidelines [33–35] the acceptable compression rate is between 100 and 120 cpm, thus Δ = 10 (cpm) was chosen as an acceptance criterion. REpar measures the performance of the CPR summary parameters listed in Section 2.3. REpar is given in percentage and defined as
(2) |
where ParD is a CPR summary parameter estimated by the app and ParR the corresponding CPR parameter found from the reference signal. If the test contained more than one sequence, the results are presented with mean and standard deviations, i.e., , μP(σP), and μREpar(σREpar), found over the result values of the sequences.
Desired detection results provide a low Average error, a low Relative error parameter, REpar, and a high Performance, P.
2.5. Experiments
The performance of the QCPR cam-app 2.0 was tested in various conditions that could occur in real emergencies. The experiments were divided into five different tests—Smartphone position test, Outdoor test, Disturbance test, Random movement test, and CPR summary report test. Altogether, this sums up to approximately 162 minutes of CPR. Specifications for the subtests included in each test are listed in Table 1.
Table 1.
Subtest name | Compression rate (cpm) | Duration (s) | Camera position | Lighting | Measures | |
---|---|---|---|---|---|---|
Smartphone position test (n=7) | ||||||
RateP126 | Normal | 60, 100, 120, 150 | 60 x 4 | Pos.1 | 480 lux | , μP |
D1R110P126 | Disturb. person | 110 | 120 | Pos.1 | 480 lux | , μP |
30:2P1 | 30:2 | 110 | 90 | Pos.1 | 480 lux | , μP |
LightP1 | Dimmed light | 110 | 60 | Pos.1 | 7 lux | , μP |
R100P2 | Small part of image frame (position Change) | 100 | 60 | Pos.2 | 480 lux | , μP |
R150P2 | Small part of image frame (position Change) | 150 | 60 | Pos.2 | 480 lux | , μP |
30:2P3 | 30:2 (position Change) | 110 | 90 | Pos.3 | 480 lux | , μP |
R100P3 | Normal (position Change) | 100 | 60 | Pos.3 | 480 lux | , μP |
| ||||||
Outdoor test (n=3) | ||||||
OCBR110P1 | Cloudy with noisy (threes) background | 110 | 60 | Pos.1 | Cloudy weather | , μP |
OCR110P1 | Cloudy with no background | 110 | 60 | Pos.1 | Cloudy weather | , μP |
OSBR110P1 | Sunny with noisy (threes) background | 110 | 60 | Pos.1 | Sunny weather | , μP |
OSR110P1 | Sunny with no background | 110 | 60 | Pos.1 | Sunny weather | , μP |
| ||||||
Disturbance test (n=1) | ||||||
D2R110P1 | Disturbing person | 110 | 180 | Pos.1 | Normal indoor | , μP |
| ||||||
Random movement test (n=3) | ||||||
Ran.MovP1 | Random movements | — | 150 | Pos.1 | Normal indoor | μP |
| ||||||
CPR summary report test (n=5) | ||||||
CPRsrR110P1 | Compressions with pauses | 110 | 580 | Pos.1 | Normal indoor | μREpar |
R = rate; P = position; D = disturbance; O = outdoor; B = noisy background; C = cloudy; S = sunny; CPRsr = CPR summary report.
The Smartphone position test included seven test persons—two with short hair (SH), two with medium length loose hair (MLLH) i.e., chin/shoulder length, and three with long loose hair (LLH) i.e., chest length. Each of the test persons performed 8 subtests carried out indoor.
The result for subtest RateP1, Table 1, was presented in Meinich-Bache et al. [36] to verify that QCPR cam-app 2.0 is able to estimate correct compression rate for test objects with various hair lengths and for different compression rates, which were an issue in QCPR cam-app 1.0 [31].
The subtest D1R110P1 included a person that walks around and behind the bystander during CPR, leaning over the patient, waving his arms, and thus causing disturbances. These results were also presented in Meinich-Bache et al. [36] to verify improvements of QCPR cam-app 2.0 over QCPR cam-app 1.0 where sometimes disturbances could take over the dynamic ROI [31]. The results of subtests RateP1 and D1R110P1 are repeated here for the reader to experience all the various tests that QCPR cam-app 2.0 has been exposed to.
Various other conditions were also tested in the Smartphone position test. Three camera positions were included: next to shoulder (Pos.1), 20 cm away from shoulder (Pos.2), and next to head (Pos.3). The camera positions are shown in Figure 3. 30 : 2 sessions were carried out for camera positions Pos 1, subtest 30 : 2P1, and Pos 3, subtest 30:2P3. Pos.3 was included to see if the algorithm provides false detection when the bystander is still visible in the image frame when performing rescue breaths. Since the bystander is not visible in the image frame while performing rescue breaths when the camera is positioned in Pos.2, this position is not relevant for the 30:2 sessions and therefore not included. Pos.2 is used to measure the algorithm's ability to detect when only a small part of the bystander is visible in the image frame and used in subtests R100P2 and R150P2. The algorithm was also tested in low lighting conditions, 7 lux, in subtest LightP1.
The Outdoor test included three test persons, one with each hair length; SH, MLLH, and LLH. The detections were carried out in cloudy (C) and sunny (S) weather, both with and without noisy background (B) i.e., trees.
The purpose of the Disturbance test was two-fold: (1) to measure the algorithm's ability to detect compression rate when there is a large disturbance present i.e., another moving person, and to (2) quantify the disturbance size relative to the bystander performing the compressions when the algorithm fails to detect due to too much noise. A second Sony Xperia Z5 Compact (Sony, Japan) phone was used to capture video recordings of the test, and the video is studied offline to perform the quantification. The bystander carried out continuous compressions during the sequence. The disturbing person moved around the patient, waving arms in different frequencies, standing behind and over the bystander while waving arms, stepping over patient etc.
In the Random movement test, no CPR was performed on the manikin and the purpose of the test was to measure the algorithm's resilience to false detections. The random movement included checking breathing and pulse of patient, turning patient, unzipping jacket, walking around, waving for help etc. Three test persons were included.
The CPR summary report test is an evaluation of the session summary parameters. The test included five different test persons with different hair lengths and the following test protocols:
The bystander sits next to patient with the smartphone in his hands. He/she presses the emergency call button and places the smartphone flat on the ground. For approximately 20 seconds, the bystander checks for patient's pulse and respiration before starting performing chest compressions.
Next, four intervals of 120-second continuous compressions and 20-second pauses while checking for respiration are followed.
The total sequence time is approximately 580 s, which is a typical response time for medical assistance [37–40].
The CPR summary parameters evaluated are the parameters explained in Section 2.3: TFSCR, TC, TWC, ACR, and NC.
3. Results
The error measurement results of all five tests are summarized in Table 2. The average compression rate detection error, , was 2.7 compressions per minute (±5.0 cpm), the performance, P, accepted detections in 98% (±5.5) of the time and the relative error of the CPR summary parameters, REpar, were 4.5% (±3.6). In subtest R150P2 from the Smartphone position test, the results reveal some weaknesses when only a small part of the bystander is visible to the camera, the compression rate is as high as 150 cpm and the person performing compression has MLLH or LLH. In the two sequences with poor results, P of 56.2% and 80.2%, the bystander is only present in 4.6% and 6.9% of the image frame and an example from the largest one is shown in Figure 4(a). Figures 4(b)–4(d) also show examples from the subtests: (B) low lighting conditions, LightP1, (C) LLH in noisy outdoor conditions, OSBR110P1, and (D) the smallest disturbance, occupying 3.4 times the size of the area occupied by the bystander, that cause the algorithm to fail to detect for a short period of time in D2R110P1.
Table 2.
(cpm) (0->) | μP(σP) (%) (0–100) | μREpar(σREpar) (%) | |
---|---|---|---|
Smartphone position test (n=7) | |||
RateP126 | 1.3 (0.3) | 99.7 (0.3) | — |
D1R110P126 | 1.8 (1.3) | 99.5 (1.2) | — |
30:2P1 | 4.5 (3.8) | 95.9 (3.7) | — |
LightP1 | 1.1 (0.3) | 100 (0) | — |
R100P2 | 3.0 (3.4) | 98.1 (3.7) | — |
R150P2 | 11.4 (14.9) | 89.8 (16.4) | — |
30:2P3 | 3.3 (1.4) | 96.0 (2.1) | — |
R100P3 | 1.1 (0.2) | 99.9 (0.4) | — |
| |||
Outdoor test (n=3) | |||
OCBR110P1 | 1.7 (0.3) | 100 (0) | — |
OCR110P1 | 1.5 (0.3) | 100 (0) | — |
OSBR110P1 | 1.4 (0.4) | 99.7 (0.5) | — |
OSR110P1 | 1.1 (0.4) | 100 (0) | — |
| |||
Disturbance test (n=1) | |||
D2R110P1 | 5.8 | 96.0 | — |
| |||
Random movement test (n=3) | |||
Ran.MovP1 | — | 89.6 (2.5) | — |
| |||
CPR summary report test (n=5) | |||
CPRsrR110P1 | TFSCR | — | 6.1 (3.3) |
TC | — | 2.8 (2.6) | |
TWC | — | 10.0 (9.1) | |
ACR | — | 1.8 (1.2) | |
NC | — | 1.6 (1.0) | |
Total (all tests) | 2.7 (5.0) | 98.0 (5.5) | 4.5 (3.6) |
The results are given in mean Average error, , mean Performance, μP, and mean Relative error parameter, μREpar. Standard deviations are shown in parenthesis. R = rate; P = position; D = disturbance; O = outdoor; B = noisy background; C = cloudy; S = sunny; CPRsr = CPR summary report.
The Bland Altman plot in Figure 5 shows the agreement between reference data and detection data for Smartphone position test, Outdoor test, and the Disturbance test. Each analysis in all the test sequences are here included. The subtests with poorer results, 30:2P1, R150P2, and 30:2P3, is marked with the colors red, yellow, and purple, respectively. The total number of samples in the plot is 11718, and the number of samples with larger deviation than ±10 cpm compared to reference data is 180 (1.53%).
In Figure 6 the Bland Altman plots show the agreement between the summary parameters calculated from the detection data and the summary parameters calculated from the reference data in the CPR summary report test.
4. Discussion
The results presented in this paper show that the camera in a smartphone can be used to measure chest compression rates and hands-off times under various conditions with good accuracy. Our proposed method allows for real-time feedback to both the bystander and to a dispatcher in real emergencies, which could improve CPR quality.
4.1. Challenges
Although the algorithm works well with only a small part of the bystander being visible under low noise situations, we discovered reduced accuracy in two of the sequences where the bystander had long loose hair, compressed with a very high rate and were visible only in a small part of the image frame. In these sequences, the loose hair is sometimes almost the only thing visible in the image frame and QCPR cam-app 2 interprets this as compression in the rate the visible hair is bouncing in. These two cases explain the yellow samples, in R150P2, that caused disagreement in the Bland Altman plot, Figure 5. To avoid these false detections the bystander should position the smartphone such that most of the head and shoulders are captured in the image frame.
We also experienced that repetitive random movements during compression pauses could cause the algorithm to detect a false stable-low compression rate causing QCPR cam-app 2 to calculate a longer TC and a shorter TWC. It could be observed that during compression pauses people often bend towards and away from the patient in a sometime very repetitive movement, and on a few occasion when the bystander had long loose hair, these movements caused the algorithm to interpret the movements as a stable but very low compression rate lasting a minimum of 5 seconds. These false stable-low compression rate detections did not occur in the Random Movement Test when the test persons were asked to perform all kinds of different tasks that could be carried out before compression starts. Deactivating the dynamic rate range could solve this problem, but a consequence of this would be that compressions rates below 70 cpm would not be detected.
The samples that show disagreement between the detections data and the reference data in Figure 5 for subtest 30 : 2P1 (red) and 30 : 2P3 (purple) occurs in the transitions between compression and compression pauses when performing 30:2 and do not significantly affect the visual presentation of the detected signal that is shown to the dispatcher.
4.2. Further Work
The proposed system allows the bystander to have both hands free with compression feedback on the smartphone screen visible next to the patient which is different from accelerometer-based smartphone solutions that require the smartphone to be held on the patient's chest or strapped to the bystander's arm [24, 25, 27–30]. This advantage could make the proposed solution suited for real emergencies where the phone is also used as a life line to the emergency unit. Studies comparing the proposed solution with the accelerometer-based solutions in simulated emergencies should be considered.
Testing of QCPR cam-app 2.0 in simulated real emergencies must be carried out in order to conclude if this method could be suited for real emergencies. In addition, studies with the aim of documenting the usability of the application, safety of the method, and effectiveness on the CPR quality also need to be carried out as suggested by Rumsfeld et al. [16]. If QCPR cam-app 2.0 shows a well-documented positive effect on the CPR quality, it may be subject to appropriate medical device regulations and made available for clinical use [41, 42].
The detected and stored compression rate signal and the CPR summary report provide further opportunity for evaluation, debriefing and quality improvement of the dispatcher-caller interaction. The stored data and the visual dispatcher feedback system can be used to provide continuing education in T-CPR for dispatchers, as AHA recommends in T-CPR guidelines [43]. In addition, these measurements can provide the EMS arriving at the scene with detailed information about the treatment the patient has received. A feature which records audio and video will be considered integrated in QCPR cam-app 2. A possible solution could be to let the recordings be automatically uploaded to a cloud storage when available bandwidth would allow it. Still images, video, and audio could be made available for the dispatcher and allow for a better understanding of the emergency situations. Audio recordings may also be analyzed with respect to chest compression rate and inactivity to further improve measurement accuracy since most dispatcher protocols include prompting and counting loud while compressing on the chest.
The collected data could also be utilized in a machine learning framework providing potential decision support in future systems.
We are currently investigating camera-based methods for measurement of compression depths [44]. In future work, we will try to develop a robust depth algorithm that could be implemented together with the proposed method. An implementation of depth measurement would make this solution a complete CPR quality measurement and feedback device. Although the proposed solution's main idea is to assist laypersons in real emergencies, we have also developed a training version of the solution called TCPR Link, available on App Store and Google Play [45, 46] in selected countries. As AHA has announced, CPR feedback devices will also be required to use in all AHA CPR courses by February, 2019 [47].
Studies have also shown that both laypersons and professionals could benefit from objective feedback during CPR. In a study presented by Abella et al. [48], the CPR-certified rescuers performed chest compression rates <80 cpm in 36.9% of the CPR segments included in the study and rates of 100 ± 10 cpm in only 31.4% of the segments, clearly suggesting that CPR-certified rescuers could also benefit from the proposed solution.
4.3. Study Limitations
The validity testing of the QCPR cam-app 2.0 was assessed with a manikin in a simulated cardiac arrest.
The QCPR cam-app 2.0 does not measure chest compression depth.
The bystanders used in the validity testing were aware of CPR and the QCPR cam-app 2.
5. Conclusion
Real-time chest compression quality measurement by smartphone camera is feasible for a range of bystanders, compression rates, camera positions, and noise conditions. This technology may be used to measure and improve the quality of telephone CPR and minimize hands-off times.
Acknowledgments
We want to thank Solveig Haukås Haaland, (Laerdal Medical) for help with planning and execution of experiments and Thomas Hinna (BI Builders) and Daniel Vartdal (Webstep Stavanger) for help with real-time implementation of the algorithm in an android app. The study and application development was funded by University of Stavanger and Laerdal Medical.
Appendix
Method
This appendix provides a pseudocode description of method for measurement of chest compression rate. More details can be found in [31, 36]. The application is called TCPR link and is available on App Store [43] and Google Play [44].
Let the input, f l(i, j), represent video frames, l, where (i, j) corresponds to row index i and column index j. Output is the filtered compression rate measurement, CRf(n), for each 0.5 sec analysis interval, n.
Input: f l(i, j), Output: CRf(n)
while receiving image frames do
Activity measurement:
(1) Generating difference frame:
for All pixels in frame do
if|f l(i, j) − f l−1(i, j)|<=ε then
g l(i, j)⟵0
else
g l(i, j)⟵f l(i, j) − f l−1(i, j)
end if
end for
(2) Dividingg l(i, j)into non-overlapping blocks and finding the sum of change in region block,R k over the received frames, L, in the last half second:
S Rk L(n)⟵∑L−1 L S Rk(m)⟵∑L−1 L∑(i, j)∈Rk|g m(i, j)|
(3) Marks the blocks with S Rk L(n)>than the average block activity, S R L(n) , with an indicator function,I Rk(n):
if S Rk L(n)> S R L(n) then
I Rk(n)⟵1
else
I Rk(n)⟵0
end if
if ROI established=FALSE then
Establishing ROI
(4) Establishes a temporary ROI:
R k ∈ {T − ROI n} if∑m=n−3 n I Rk(m) ≥ 3
(5) Fills block-gaps in the temporary ROI:
R k ∈ {TF − ROI n} if R k is a gap in a connected object in T-ROI
(6) Choses the largest connected object,LCO, in the TF-ROI: to be the established ROI.
R k ∈ {ROI n} if R k ∈ {TF − ROI LCO,n}
ROI established=TRUE
end if
while ROI established=TRUE do for each half second:
Activity signal from ROI
(7) Generate difference signal at time point, l:
d(l)=∑Rk∈ROIn∑(i, j)∈Rk g(i, j)
Frequency analysis
(8) STFT is performed on overlapping blocks ofd(l), with blocklengthL f corresponding to 3 sec., updated every 0.5 sec. A sliding Hanning window is used prior to the STFT. The PSD,D n(w), is estimated by the periodogram calculated from the STFT:
D n(w)=1/L f|ℱM{d hf(l)}|2 l=(n − 1)L f : nL f
where ℱM denotes M point FFT, and d hf(l) denotes the Hanning filtered difference signal.
PSD modelling:
(9) Decision tree. Recognizes and handle cases of long loose hair and separate compressions from noise. Relevant frequency range is 40-160 (cpm):
Attributes found from D n(w):
(1) Amplitude of the first significant peak, a p1(n),
(2) Amplitude of the second significant peak, a p2(n),
(3) Frequency of the first significant peak, f p1(n),
(4) Frequency of the second significant peak, f p2(n) and
(5) Mean amplitude hight of PSD, a PSD(n).
CR(n)⟵decisionTree(a p1(n), a p2(n), f p1(n), f p2(n), a PSD(n),
Post processing
CR f(n)=CR(n)
(10) Short spike/drop removal:
if|CR f(n − 1) − CR f(n − 1 − k)| < T sd1 ∀k ≤ 2then
if|CR(n) − CR f(n − 1)| > T sd2 then
CR f(n)=CR(n − 1)
i=i+1
if i=4then
CR f(n − 3 : n)=CR(n − 3 : n)
i=0
end if
else
i=0
end if
end if
(11) Smoothing mean filter:
for j=1 : 3do
K=argmaxJ |CR f(n) − CR f(n − j)| < T mf, ∀j ≤ J
end for
CR f(n)=∑k=0 K a k CR f(n − k)
where a k is the filter coefficients, ∑k=0 K a k=1
and a j=a i ∀ i, j.
(12) Dynamic rate range:
CR drr(n)=CR f(n);
if CR drr(n) < 70then
for j=1 : 10do
K=argmaxJ |CR drr(n) − CR drr(n − j)| < T drr, ∀j ≤ J
end for
if K=10 then
CR f(n − 10 : n)=CR drr(n − 10 : n)
else
CR f(n)=0
end if
end if
ROI update:
(13) Add and remove blocks in ROI:
if S boi L(n)>0.5· S R L(n) then
R bo,i ∈ {ROI n}
end if
if S bii L(n)>0.5· S R L(n) then
R bi,i ∉ {ROI n}
end if
where R bo,i denote block i on the outside of the ROIn boundary and R bi,i denote block i inside the ROIn
(14) Freq. analysis if ROI is divided into multiple areas:
if# of connected areas, A ROI, ∈{ROI n} > 1then
for i=1 : # of A ROI do
Perform step 7, 8 and 9, and
if CR AROI,i(n) is in range of 40–160 cpm then
A ROI,i ∈ {ROI n}
else
A ROI,i ∉ {ROI n}
end if
end for
end if
if# of R bi,i ∈ {ROI n} < 2then
ROI established=FALSE
end if
end while
end while
Data Availability
The data used in the evaluation of the study are included as supplementary materials in this published article. Our system does not capture and store the videos but only detects, thus the videos cannot be made available.
Disclosure
The results and the application were presented at Emergency Cardiovascular Care Conference (ECCU), December 2017, New Orleans, USA [49].
Conflicts of Interest
Tonje Søraas Birkenes and Helge Myklebust are employees of Laerdal Medical.
Supplementary Materials
References
- 1.Bossaert L. L., Perkins G. D., Askitopoulou H., et al. European resuscitation council guidelines for resuscitation 2015. Resuscitation. 2015;95:302–311. doi: 10.1016/j.resuscitation.2015.07.033. [DOI] [PubMed] [Google Scholar]
- 2.Norheim O. F., Jha P., Admasu K., et al. Avoiding 40% of the premature deaths in each country, 2010–30: review of national mortality trends to help quantify the un sustainable development goal for health. The Lancet. 2015;385(9964):239–252. doi: 10.1016/s0140-6736(14)61591-9. [DOI] [PubMed] [Google Scholar]
- 3.Pell J. P., Sirel J. M., Marsden A. K., Ford I., Cobbe S. M. Effect of reducing ambulance response times on deaths from out of hospital cardiac arrest: cohort study. BMJ. 2001;322(7299):1385–1388. doi: 10.1136/bmj.322.7299.1385. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Wissenberg M., Lippert F. K., Folke F., et al. Association of national initiatives to improve cardiac arrest management with rates of bystander intervention and patient survival after out-of-hospital cardiac arrest. JAMA. 2013;310(13):1377–1384. doi: 10.1001/jama.2013.278483. [DOI] [PubMed] [Google Scholar]
- 5.Kern K. B., Hilwig R. W., Berg R. A., Sanders A. B., Ewy G. A. Importance of continuous chest compressions during cardiopulmonary resuscitation. Circulation. 2002;105(5):645–649. doi: 10.1161/hc0502.102963. [DOI] [PubMed] [Google Scholar]
- 6.Steen S., Liao Q., Pierre L., Paskevicius A., Sjöberg T. The critical importance of minimal delay between chest compressions and subsequent defibrillation: a haemodynamic explanation. Resuscitation. 2003;58(3):249–258. doi: 10.1016/s0300-9572(03)00265-x. [DOI] [PubMed] [Google Scholar]
- 7.Meaney P. A., Bobrow B. J., Mancini M. E., et al. Cardiopulmonary resuscitation quality: Improving cardiac resuscitation outcomes both inside and outside the hospital. Circulation. 2013;128(4):417–435. doi: 10.1161/cir.0b013e31829d8654. [DOI] [PubMed] [Google Scholar]
- 8.Swor R., Khan I., Domeier R., Honeycutt L., Chu K., Compton S. CPR training and CPR performance: do CPR-trained bystanders perform CPR? Academic Emergency Medicine. 2006;13(6):596–601. doi: 10.1111/j.1553-2712.2006.tb01017.x. [DOI] [PubMed] [Google Scholar]
- 9.Birkenes T. S., Myklebust H., Neset A., Kramer-Johansen J. High quality cpr with optimized rescuer-dispatcher teamwork. Circulation. 2016;128(22)A15393 [Google Scholar]
- 10.Birkenes T. S., Myklebust H., Neset A., Olasveengen T. M., Kramer-Johansen J. Video analysis of dispatcher–rescuer teamwork–effects on cpr technique and performance. Resuscitation. 2012;83(4):494–499. doi: 10.1016/j.resuscitation.2011.09.021. [DOI] [PubMed] [Google Scholar]
- 11.Akahane M., Ogawa T., Tanabe S., et al. Impact of telephone dispatcher assistance on the outcomes of pediatric out-of-hospital cardiac arrest∗. Critical Care Medicine. 2012;40(5):1410–1416. doi: 10.1097/ccm.0b013e31823e99ae. [DOI] [PubMed] [Google Scholar]
- 12.Kramer-Johansen J., Myklebust H., Wik L., et al. Quality of out-of-hospital cardiopulmonary resuscitation with real time automated feedback: a prospective interventional study. Resuscitation. 2006;71(3):283–292. doi: 10.1016/j.resuscitation.2006.05.011. [DOI] [PubMed] [Google Scholar]
- 13.Handley A. J., Handley S. A. J. Improving CPR performance using an audible feedback system suitable for incorporation into an automated external defibrillator. Resuscitation. 2003;57(1):57–62. doi: 10.1016/s0300-9572(02)00400-8. [DOI] [PubMed] [Google Scholar]
- 14.Yang C. W., Wang H. C., Chiang W. C., et al. Interactive video instruction improves the quality of dispatcher-assisted chest compression-only cardiopulmonary resuscitation in simulated cardiac arrests∗. Critical Care Medicine. 2009;37(2):490–495. doi: 10.1097/ccm.0b013e31819573a5. [DOI] [PubMed] [Google Scholar]
- 15.Neset A., Birkenes T. S., Myklebust H., Mykletun R. J., Odegaard S., Kramer-Johansen J. A randomized trial of the capability of elderly lay persons to perform chest compression only CPR versus standard 30:2 CPR. Resuscitation. 2010;81(7):887–892. doi: 10.1016/j.resuscitation.2010.03.028. [DOI] [PubMed] [Google Scholar]
- 16.Rumsfeld J. S., Brooks S. C., Aufderheide T. P., et al. Use of mobile devices, social media, and crowdsourcing as digital strategies to improve emergency cardiovascular care. Circulation. 2016;134(8):e87–e108. doi: 10.1161/cir.0000000000000428. [DOI] [PubMed] [Google Scholar]
- 17.Kleinman M. E., Brennan E. E., Goldberger Z. D., et al. Part 5: adult basic life support and cardiopulmonary resuscitation quality. Circulation. 2015;132(18):S414–S435. doi: 10.1161/cir.0000000000000259. [DOI] [PubMed] [Google Scholar]
- 18.Buléon C., Parienti J. J., Halbout L., et al. Improvement in chest compression quality using a feedback device (cprmeter): a simulation randomized crossover study. American Journal of Emergency Medicine. 2013;31(10):1457–1461. doi: 10.1016/j.ajem.2013.07.029. [DOI] [PubMed] [Google Scholar]
- 19. CPR measurement device: CPR meter 2, http://www.laerdal.com/us/products/medical-devices/cprmeter-2/
- 20.Cheng A., Brown L. L., Duff J. P., et al. Improving cardiopulmonary resuscitation with a CPR feedback device and refresher simulations (CPR cares study): a randomized clinical trial. JAMA Pediatrics. 2015;169(2):137–144. doi: 10.1001/jamapediatrics.2014.2616. [DOI] [PubMed] [Google Scholar]
- 21. Smartwatch-app: W-CPR, https://play.google.com/store/apps/details?id=com.melab.w_cpr.
- 22. Smartwatch-app: CPR wear, https://play.google.com/store/apps/details?id=com.sack.cpwear.
- 23.Song Y., Chee Y., Oh J., Ahn C., Lim T. H. Smartwatches as chest compression feedback devices: a feasibility study. Resuscitation. 2016;103:20–23. doi: 10.1016/j.resuscitation.2016.03.014. [DOI] [PubMed] [Google Scholar]
- 24. Smartphone-app: ICPR, http://icpr.it/
- 25.Semeraro F., Taggi F., Tammaro G., Imbriaco G., Marchetti L., Cerchiari E. L. ICPR: a new application of high-quality cardiopulmonary resuscitation training. Resuscitation. 2011;82(4):436–441. doi: 10.1016/j.resuscitation.2010.11.023. [DOI] [PubMed] [Google Scholar]
- 26. Norsk luftambulanse-app: Hjelp 113-GPS, https://norskluftambulanse.no/apper/
- 27.Amemiya T., Maeda T. Poster: depth and rate estimation for chest compression CPR with smartphone. Proceedings of IEEE Symposium on 3D User Interfaces (3DUI); March 2013; Piscataway, NJ, USA. pp. 125–126. [Google Scholar]
- 28.Gupta N. K., Dantu V., Dantu R. Effective CPR procedure with real time evaluation and feedback using smartphones. IEEE Journal of Translational Engineering in Health and Medicine. 2014;2:1–11. doi: 10.1109/jtehm.2014.2327612. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Kalz M., Lenssen N., Felzen M., et al. Smartphone apps for cardiopulmonary resuscitation training and real incident support: a mixed-methods evaluation study. Journal of Medical Internet Research. 2014;16(3):p. e89. doi: 10.2196/jmir.2951. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Song Y., Oh J., Chee Y. A new chest compression depth feedback algorithm for high-quality CPR based on smartphone. Telemedicine and e-Health. 2015;21(1):36–41. doi: 10.1089/tmj.2014.0051. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Engan K., Hinna T., Ryen T., Birkenes T. S., Myklebust H. Chest compression rate measurement from smartphone video. BioMedical Engineering OnLine. 2016;15(1) doi: 10.1186/s12938-016-0218-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Frisch A., Das S., Reynolds J. C., Torre F. d. L., Hodgins J. K., Carlson J. N. Analysis of smartphone video footage classifies chest compression rate during simulated CPR. American Journal of Emergency Medicine. 2014;32(9):1136–1138. doi: 10.1016/j.ajem.2014.05.040. [DOI] [PubMed] [Google Scholar]
- 33.Fernández Lozano I., Urkía C., Lopez Mesa J. B., et al. European resuscitation council guidelines for resuscitation 2015: key points. Revista Española de Cardiología (English Edition) 2016;69(6):588–594. doi: 10.1016/j.rec.2016.03.005. [DOI] [PubMed] [Google Scholar]
- 34.Neumar R. W., Shuster M., Callaway C. W., et al. Part 1: executive summary. Circulation. 2015;132(18):S315–S367. doi: 10.1161/cir.0000000000000252. [DOI] [PubMed] [Google Scholar]
- 35.Chung S. P., Sakamoto T., Lim S. H., et al. The 2015 resuscitation council of asia (RCA) guidelines on adult basic life support for lay rescuers. Resuscitation. 2016;105:145–148. doi: 10.1016/j.resuscitation.2016.05.025. [DOI] [PubMed] [Google Scholar]
- 36.Meinich-Bache Ø., Engan K., Birkenes T. S., Myklebust H. Robust real-time chest compression rate detection from smartphone video. Proceedings of 10th International Symposium on Image and Signal Processing and Analysis; September 2017; Ljubljana, Slovenia. [Google Scholar]
- 37.Nichol G., Thomas E., Callaway C. W., et al. Regional variation in out-of-hospital cardiac arrest incidence and outcome. JAMA. 2008;300(12):1423–1431. doi: 10.1001/jama.300.12.1423. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Shin S. D., Hock Ong M. E., Tanaka H., et al. Comparison of emergency medical services systems across pan-asian countries: a web-based survey. Prehospital Emergency Care. 2012;16(4):477–496. doi: 10.3109/10903127.2012.695433. [DOI] [PubMed] [Google Scholar]
- 39.Yasunaga H., Miyata H., Horiguchi H., et al. Population density, call-response interval, and survival of out-of-hospital cardiac arrest. International Journal of Health Geographics. 2011;10(1):p. 26. doi: 10.1186/1476-072x-10-26. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Hasselqvist-Ax I., Riva G., Herlitz J., et al. Early cardiopulmonary resuscitation in out-of-hospital cardiac arrest. New England Journal of Medicine. 2015;372(24):2307–2315. doi: 10.1056/nejmoa1405796. [DOI] [PubMed] [Google Scholar]
- 41. Mobile medical applications-FDA, https://www.fda.gov/medicaldevices/digitalhealth/mobilemedicalapplications/default.htm.
- 42. Medical devices - the council of the european communities, https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31993L0042:EN:HTML.
- 43. Telephone CPR (T-CPR) program recommendations and performance measures, http://cpr.heart.org/AHAECC/CPRAndECC/ResuscitationScience/TelephoneCPR/RecommendationsPerformanceMeasures/UCM_477526_Telephone-CPR-T-CPR-Program-Recommendations-and-Performance-Measures.jsp.
- 44.Meinich-Bache Ø., Engan K., Eftestøl T., Austvoll I. Detecting chest compression depth using a smartphone camera and motion segmentation. Proceedings of Scandinavian Conference on Image Analysis; May 2017; Tromsø, Norway. pp. 53–64. [Google Scholar]
- 45. TCPR link on app store, https://itunes.apple.com/us/app/tcpr-link/id1314904593?mt=8.
- 46. TCPR link on google play, https://play.google.com/store/apps/details?id=no.laerdal.global.health.tcprlink&hl=en.
- 47. Use of feedback devices in adult CPR training, http://minnstate.edu/system/asa/workforce/mrtc/updates/documents/use_of_feedback_devices_in_aha_adult_cpr_training_courses.pdf.
- 48.Abella B. S., Sandbo N., Vassilatos P., et al. Chest compression rates during cardiopulmonary resuscitation are suboptimal. Circulation. 2005;111(4):428–434. doi: 10.1161/01.cir.0000153811.84257.59. [DOI] [PubMed] [Google Scholar]
- 49. Emergency cardiovascular care update (ECCU) 2017 presentation, https://citizencpr.org/wp-content/uploads/2018/01/CPR-Measurement-and-Feedback-by-Smartphone-Camera.pdf.
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The data used in the evaluation of the study are included as supplementary materials in this published article. Our system does not capture and store the videos but only detects, thus the videos cannot be made available.