Channel Intensity and Edge-Based Estimation of Heart Rate via Smartphone Recordings
Abstract
:1. Introduction
- Developing of a novel two-stage mechanism to calculate user’s heart rate via their smartphone.
- Providing a detailed analysis of the results so obtained via relative performance accuracy and standard error of estimates (SEE).
- Performing agreement analysis between actual and calculated heart rates using Pearson’s correlation and the Bland–Altman method, to validate results.
2. Related Works
3. Methods and Materials
3.1. Dataset Collection and Description
3.2. Edge-Detection Mode
3.2.1. Pre-Processing and Edge Detection
3.2.2. Heart Rate Calculation
3.3. Channel-Intensity Mode
3.3.1. Pre-Processing
3.3.2. Heart Rate Calculation
Algorithm 1: Overview of Data Acquisition, Processing, and Measurement of Heart Rate | |
Input: Path to main folder with ‘N’ number of video recordings | |
Output: ‘N’ heart Rate measurements corresponding to ‘N’ recordings | |
//Save all recordings in main folder for processing | |
1 | for i = 1-->N do |
2 | Extract all frames from video i |
3 | if smartphone model compatible == True then |
//EDGE-DETECTION METHOD | |
4 | frames_copy = duplicates of video i frames |
5 | Discard frames from frames_copy to reduce frame rate to 20 fps |
6 | for j = 1→ __ (num_frames_duplicate) do//Do for all frames in frames_copy |
//Generation of edge-detected frames | |
7 | Crop frame j to be of dimension 720 x 1440 |
8 | //Processing before mode validation |
9 | Convert RGB frame j to grayscale |
10 | Adjust contrast of frame j |
11 | Sharpen frame j |
12 | Perform edge detection on frame j using Canny method |
13 | End |
14 | if edges clear AND spatial movement of edges visible == True then |
//Heart Rate Measurement | |
15 | Select Reference Frame |
16 | for j = 1 → num_frames do//Do for all edge-detected frames |
17 | Calculate RMSE between grayscales of reference frames and frames with temporal position after reference frame |
18 | End |
19 | counter = number of times RMSE value switches between zero and non-zero values |
20 | HR = (60 × counter)/vid_length / /Video length in seconds |
21 | return HR |
22 | continue/ /Begin next iteration, i.e., calculate HR for next video |
23 | else/ /Validate mean red channel frame intensities |
24 | bad_count = 0 |
25 | for k = 1 → num_frames_orginal do//Do for original full set of frames in video |
26 | if 180 <mean red channel intensity of frame k <220 then |
27 | bad_count = bad_count + 1 |
28 | End |
29 | if bad_count < 0.1(num_frames_original) then |
//CHANNEL-INTENSITY METHOD | |
30 | Generate raw PPG-like signal |
31 | Normalize signal |
32 | Detrend signal |
33 | Apply 5pt. moving average filter to signal |
34 | Find local maxima in signal//based on amplitudes of 5 samples before and after current sample |
35 | dmin = (60 × Frame rate)/50 |
36 | dmax = (60 × Framerate)/200 |
37 | for peak = 1→ num_local_maxima do//Candidate peak selection |
39 | Calculate distance between successive peaks |
40 | if dmin < peak_distance < dmaxthen |
41 | candidate_peak = peak |
42 | else discard peak |
43 | End |
44 | mean_distance = average distance between candidate peaks |
45 | HR = (60 × Framerate)/mean_distance |
46 | return HR |
47 | else discard video |
48 | End |
4. Experimental Results
Agreement Analysis
5. Discussion
6. Conclusions
Future Scope
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Ralapanawa, U.; Sivakanesan, R. Epidemiology and the Magnitude of Coronary Artery Disease and Acute Coronary Syndrome: A Narrative Review. J. Epidemiol. Glob. Health 2021, 11, 169–177. [Google Scholar] [CrossRef]
- Tsao, C.W.; Aday, A.W.; Almarzooq, Z.I.; Alonso, A.; Beaton, A.Z.; Bittencourt, M.S.; Boehme, A.K.; Buxton, A.E.; Carson, A.P.; Commodore-Mensah, Y.; et al. Heart Disease and Stroke Statistics—2022 Update: A Report From the American Heart Association. Circulation 2022, 145, e153–e639. [Google Scholar] [CrossRef]
- Bodkhe, S.; Jajoo, S.U.; Jajoo, U.N.; Ingle, S.; Gupta, S.S.; Taksande, B.A. Epidemiology of confirmed coronary heart disease among population older than 60 years in rural central India—A community-based cross-sectional study. Indian Heart J. 2019, 71, 39–44. [Google Scholar] [CrossRef]
- Rao, M.; Xavier, D.; Devi, P.; Sigamani, A.; Faruqui, A.; Gupta, R.; Kerkar, P.; Jain, R.K.; Joshi, R.; Chidambaram, N.; et al. Prevalence, treatments and outcomes of coronary artery disease in Indians: A systematic review. Indian Heart J. 2015, 67, 302–310. [Google Scholar] [CrossRef] [Green Version]
- Takei, K.; Honda, W.; Harada, S.; Arie, T.; Akita, S. Toward Flexible and Wearable Human-Interactive Health-Monitoring Devices. Adv. Health Mater. 2014, 4, 487–500. [Google Scholar] [CrossRef]
- Cardona-Morrell, M.; Prgomet, M.; Turner, R.M.; Nicholson, M.; Hillman, K. Effectiveness of continuous or intermittent vital signs monitoring in preventing adverse events on general wards: A systematic review and meta-analysis. Int. J. Clin. Pract. 2016, 70, 806–824. [Google Scholar] [CrossRef]
- Mayoral, C.P.; Gutiérrez, J.G.; Pérez, J.L.C.; Treviño, M.V.; Velasco, I.B.G.; Cruz, P.A.H.; Rosas, R.T.; Carrillo, L.T.; Ríos, J.A.; Apreza, E.L.; et al. Fiber Optic Sensors for Vital Signs Monitoring. A Review of Its Practicality in the Health Field. Biosensors 2021, 11, 58. [Google Scholar] [CrossRef]
- Ferreira, N.D.P.; Gehin, C.; Massot, B. A Review of Methods for Non-Invasive Heart Rate Measurement on Wrist. Irbm 2020, 42, 4–18. [Google Scholar] [CrossRef]
- Yu, Z.; Li, X.; Niu, X.; Shi, J.; Zhao, G. AutoHR: A Strong End-to-End Baseline for Remote Heart Rate Measurement With Neural Searching. IEEE Signal Process. Lett. 2020, 27, 1245–1249. [Google Scholar] [CrossRef]
- Bagha, S.; Shaw, L. A real time analysis of PPG signal for measurement of SpO2 and pulse rate. Int. J. Comput. Appl. 2011, 36, 45–50. [Google Scholar] [CrossRef]
- Castaneda, D.; Esparza, A.; Ghamari, M.; Soltanpur, C.; Nazeran, H. A review on wearable photoplethysmography sensors and their potential future applications in health care. Int. J. Biosens. Bioelectron. 2018, 4, 195. [Google Scholar]
- Newzoo’s, K.J. Global Mobile Market Report: Insights into the World’s 3 Billion Smartphone Users. 2018. Available online: https://newzoo.com/insights/articles/newzoos-2018-global-mobile-market-report-insights-into-the-worlds-3-billion-smartphone-users (accessed on 25 May 2022).
- Majumder, S.; Deen, M.J. Smartphone Sensors for Health Monitoring and Diagnosis. Sensors 2019, 19, 2164. [Google Scholar] [CrossRef] [Green Version]
- Pantelopoulos, A.; Bourbakis, N.G. A Survey on Wearable Sensor-Based Systems for Health Monitoring and Prognosis. IEEE Trans. Syst. Man Cybern. Part C Appl. Rev. 2010, 40, 1–12. [Google Scholar] [CrossRef] [Green Version]
- Garcia-Agundez, A.; Dutz, T.; Goebel, S. Adapting smartphone-based photoplethysmograpy to suboptimal scenarios. Physiol. Meas. 2017, 38, 219–232. [Google Scholar] [CrossRef]
- Huang, R.-Y.; Dung, L.-R. Measurement of heart rate variability using off-the-shelf smart phones. Biomed. Eng. Online 2016, 15, 1–16. [Google Scholar] [CrossRef] [Green Version]
- Peng, R.-C.; Zhou, X.-L.; Lin, W.-H.; Zhang, Y.-T. Extraction of Heart Rate Variability from Smartphone Photoplethysmograms. Comput. Math. Methods Med. 2015, 2015, 516826. [Google Scholar] [CrossRef] [Green Version]
- De Ridder, B.; Van Rompaey, B.; Kampen, J.K.; Haine, S.; Dilles, T. Smartphone Apps Using Photoplethysmography for Heart Rate Monitoring: Meta-Analysis. JMIR Cardio 2018, 2, e4. [Google Scholar] [CrossRef]
- Grimaldi, D.; Kurylyak, Y.; Lamonaca, F.; Nastro, A. Photoplethysmography detection by smartphone’s videocamera. In Proceedings of the 6th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems, Prague, Czech Republic, 15–17 September 2011; IEEE: Piscataway, NJ, USA, 2011; Volume 1, pp. 488–491. [Google Scholar] [CrossRef]
- Jonathan, E.; Leahy, M.J. Cellular phone-based photoplethysmographic imaging. J. Biophotonics 2010, 4, 293–296. [Google Scholar] [CrossRef]
- Pereira, T.; Gadhoumi, K.; Ma, M.; Liu, X.; Xiao, R.; Colorado, R.A.; Keenan, K.J.; Meisel, K.; Hu, X. A Supervised Approach to Robust Photoplethysmography Quality Assessment. IEEE J. Biomed. Health Inform. 2019, 24, 649–657. [Google Scholar] [CrossRef]
- Hoan, N.V.; Park, J.-H.; Lee, S.-H.; Kwon, K.-R. Real-time Heart Rate Measurement based on Photoplethysmography using Android Smartphone Camera. J. Korea Multimedia Soc. 2017, 20, 234–243. [Google Scholar] [CrossRef] [Green Version]
- Pelegris, P.; Banitsas, K.; Orbach, T.; Marias, K. A novel method to detect heart beat rate using a mobile phone. In Proceedings of the 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology, Buenos Aires, Argentina, 31 August 2010–4 September 2010; IEEE: Piscataway, NJ, USA, 2010; pp. 5488–5491. [Google Scholar] [CrossRef]
- Gregoski, M.J.; Mueller, M.; Vertegel, A.; Shaporev, A.; Jackson, B.B.; Frenzel, R.M.; Sprehn, S.M.; Treiber, F.A. Development and Validation of a Smartphone Heart Rate Acquisition Application for Health Promotion and Wellness Telehealth Applications. Int. J. Telemed. Appl. 2012, 2012, 1–7. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Scully, C.G.; Lee, J.; Meyer, J.; Gorbach, A.M.; Granquist-Fraser, D.; Mendelson, Y.; Chon, K.H. Physiological parameter monitoring from optical recordings with a mobile phone. IEEE Trans. Biomed. Eng. 2011, 59, 303–306. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Srivastava, R.; Gupta, J.R.P.; Parthasarthy, H.; Srivastava, S. PDE Based Unsharp Masking, Crispening and High Boost Filtering of Digital Images. In Computing. IC3 2009; Communications in Computer and Information Science; Springer: Berlin/Heidelberg, Germany, 2009; Volume 40. [Google Scholar] [CrossRef]
- Diklic, D.; Petkovic, D.; Danielson, R. Automatic extraction of representative keyframes based on scene content. In Proceedings of the Conference Record of Thirty-Second Asilomar Conference on Signals, Systems and Computers (Cat. No. 98CH36284), Pacific Grove, CA, USA, 1–4 November 1998; IEEE: Piscataway, NJ, USA, 1998; Volume 1. [Google Scholar]
- Maeda, Y.; Sekine, M.; Tamura, T.; Moriya, A.; Suzuki, T.; Kameyama, K. Comparison of reflected green light and infrared photoplethysmography. In Proceedings of the 2008 30th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Vancouver, BC, Canada, 20–25 August 2008; IEEE: Piscataway, NJ, USA, 2008; pp. 2270–2272. [Google Scholar] [CrossRef]
- Tarvainen, M.; Ranta-Aho, P.; Karjalainen, P. An advanced detrending method with application to HRV analysis. IEEE Trans. Biomed. Eng. 2002, 49, 172–175. [Google Scholar] [CrossRef]
- Chen, Y.; Li, D.; Li, Y.; Ma, X.; Wei, J. Use moving average filter to reduce noises in wearable PPG during continuous monitoring. In eHealth 360; Springer: Cham, Switzerland, 2017; pp. 193–203. [Google Scholar] [CrossRef]
- Schäfer, A.; Vagedes, J. How accurate is pulse rate variability as an estimate of heart rate variability? Int. J. Cardiol. 2013, 166, 15–29. [Google Scholar] [CrossRef]
- Myles, P.; Cui, J.I. Using the Bland–Altman method to measure agreement with repeated measures. Br. J. Anaesth. 2007, 99, 309–311. [Google Scholar] [CrossRef] [Green Version]
- Casella, G.; Berger, R.L. Statistical Inference, Duxbury/Thomson Learning; Cengage Learning: Boston, MA, USA, 2002. [Google Scholar]
- Amer, G.M.H.; Abushaala, A.M. Edge detection methods. In Proceedings of the 2015 2nd World Symposium on Web Applications and Networking (WSWAN), Sousse, Tunisi, 21–23 March 2015; pp. 1–7. [Google Scholar] [CrossRef]
- Ansari, M.A.; Kurchaniya, D.; Dixit, M. A comprehensive analysis of image edge detection techniques. Int. J. Multimed. Ubiquitous Eng. 2017, 12, 1–12. [Google Scholar] [CrossRef]
- Terbizan, D.J.; Dolezal, B.A.; Albano, C. Validity of Seven Commercially Available Heart Rate Monitors. Meas. Phys. Educ. Exerc. Sci. 2002, 6, 243–247. [Google Scholar] [CrossRef]
- Godsen, R.; Carroll, T.; Stone, S. How well does the Polar Vantage XL heart rate monitor estimate actual heart rate. Med Sci Sports Exerc 1991, 23 (Suppl. S4), 14. [Google Scholar]
- Léger, L.; Thivierge, M. Heart Rate Monitors: Validity, Stability, and Functionality. Physician Sportsmed. 1988, 16, 143–151. [Google Scholar] [CrossRef]
- Maestre-Rendon, J.R.; Rivera-Roman, T.A.; Fernandez-Jaramillo, A.A.; Paredes, N.E.G.; Olmedo, J.J.S. A Non-Contact Photoplethysmography Technique for the Estimation of Heart Rate via Smartphone. Appl. Sci. 2019, 10, 154. [Google Scholar] [CrossRef] [Green Version]
- Neshitov, A.; Tyapochkin, K.; Smorodnikova, E.; Pravdin, P. Wavelet Analysis and Self-Similarity of Photoplethysmography Signals for HRV Estimation and Quality Assessment. Sensors 2021, 21, 6798. [Google Scholar] [CrossRef] [PubMed]
- Niu, X.; Shan, S.; Han, H.; Chen, X. RhythmNet: End-to-End Heart Rate Estimation From Face via Spatial-Temporal Representation. IEEE Trans. Image Process. 2019, 29, 2409–2423. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Jaiswal, K.B.; Meenpal, T. Heart rate estimation network from facial videos using spatiotemporal feature image. Comput. Biol. Med. 2022, 151, 106307. [Google Scholar] [CrossRef] [PubMed]
- Ayesha, A.H.; Qiao, D.; Zulkernine, F. Heart Rate Monitoring Using PPG With Smartphone Camera. In Proceedings of the 2021 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), Houston, TX, USA, 9–12 December 2021; IEEE: Piscataway, NJ, USA, 2021. [Google Scholar]
Smartphone Model | Frame Rate | Color Format | Video Resolution | Camera Specification | File Format |
---|---|---|---|---|---|
One plus 7 | 30 fps | sRGB | 1080 × 2340 | 5 MP | .mp4 |
Xiaomi Redmi 7A | 30 fps | sRGB | 720 × 1440 | 12 MP | .mp4 |
Subject Number | Number of Recordings Provided | Average Heart Rate during Recording (bpm) |
---|---|---|
Subject—1 | 2 | 90 bpm |
Subject—2 | 6 | 72 bpm |
Subject—3 | 6 | 81 bpm |
Subject—4 | 5 | 87 bpm |
Subject—5 | 7 | 98 bpm |
Subject—6 | 6 | 76 bpm |
Video ID | Predicted Heart Rate | Actual Heart Rate | Relative Error (%) | Relative Accuracy (%) | Method Used |
---|---|---|---|---|---|
1 | 66 | 62 | 6.45 | 93.55 | Channel-Intensity |
2 | 80 | 75 | 6.67 | 93.33 | Edge-Detection |
3 | 66 | 60 | 10.0 | 90.0 | Channel-Intensity |
4 | 93 | 88 | 5.68 | 94.32 | Channel-Intensity |
5 | 64 | 67 | 4.47 | 95.53 | Channel-Intensity |
6 | 64 | 72 | 11.11 | 88.89 | Channel-Intensity |
7 | 106 | 110 | 3.64 | 96.36 | Edge-Detection |
8 | 65 | 72 | 9.72 | 90.28 | Edge-Detection |
9 | 82 | 77 | 6.50 | 93.50 | Channel-Intensity |
10 | 78 | 71 | 9.86 | 90.14 | Edge-Detection |
11 | 110 | 115 | 4.35 | 95.65 | Channel-Intensity |
12 | 99 | 94 | 5.32 | 94.68 | Edge-Detection |
13 | 82 | 86 | 4.65 | 95.35 | Edge-Detection |
14 | 72 | 78 | 7.69 | 92.31 | Channel-Intensity |
15 | 88 | 93 | 5.37 | 94.63 | Edge-Detection |
16 | 85 | 80 | 6.25 | 93.75 | Channel-Intensity |
17 | 60 | 65 | 7.69 | 92.31 | Edge-Detection |
18 | 102 | 98 | 4.08 | 95.92 | Channel-Intensity |
19 | 66 | 72 | 8.33 | 91.66 | Channel-Intensity |
20 | 75 | 86 | 12.79 | 87.21 | Channel-Intensity |
21 | 109 | 102 | 6.86 | 93.14 | Edge-Detection |
22 | 69 | 74 | 6.75 | 93.25 | Edge-Detection |
23 | 75 | 68 | 10.29 | 89.71 | Channel-Intensity |
24 | 101 | 95 | 6.31 | 93.69 | Channel-Intensity |
25 | 83 | 86 | 3.48 | 96.52 | Edge-Detection |
26 | 77 | 71 | 8.45 | 91.55 | Edge-Detection |
27 | 82 | 77 | 6.49 | 93.51 | Channel-Intensity |
28 | 75 | 70 | 7.14 | 92.86 | Channel-Intensity |
29 | 76 | 72 | 5.55 | 94.45 | Channel-Intensity |
30 | 95 | 108 | 12.03 | 87.94 | Edge-Detection |
31 | 83 | 77 | 7.79 | 92.21 | Channel-Intensity |
32 | 101 | 95 | 6.31 | 93.69 | Channel-Intensity |
Method | SEE | Pearson’s Correlation | Degree of Freedom | p Value |
---|---|---|---|---|
Edge-Detection | 6.55 | 0.91 | 11 | 4.52 × 10−8 |
Channel-Intensity | 5.95 | 0.95 | 17 | 5.34 × 10−10 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Krishnamoorthy, A.; Bairy, G.M.; Siddeshappa, N.; Mayrose, H.; Sampathila, N.; Chadaga, K. Channel Intensity and Edge-Based Estimation of Heart Rate via Smartphone Recordings. Computers 2023, 12, 43. https://doi.org/10.3390/computers12020043
Krishnamoorthy A, Bairy GM, Siddeshappa N, Mayrose H, Sampathila N, Chadaga K. Channel Intensity and Edge-Based Estimation of Heart Rate via Smartphone Recordings. Computers. 2023; 12(2):43. https://doi.org/10.3390/computers12020043
Chicago/Turabian StyleKrishnamoorthy, Anusha, G. Muralidhar Bairy, Nandish Siddeshappa, Hilda Mayrose, Niranjana Sampathila, and Krishnaraj Chadaga. 2023. "Channel Intensity and Edge-Based Estimation of Heart Rate via Smartphone Recordings" Computers 12, no. 2: 43. https://doi.org/10.3390/computers12020043
APA StyleKrishnamoorthy, A., Bairy, G. M., Siddeshappa, N., Mayrose, H., Sampathila, N., & Chadaga, K. (2023). Channel Intensity and Edge-Based Estimation of Heart Rate via Smartphone Recordings. Computers, 12(2), 43. https://doi.org/10.3390/computers12020043