Extracting vital signs with smartphone. camera

Similar documents
Method and System for Signal Analysis

Chapter 1. Introduction to Digital Signal Processing

An Effective Filtering Algorithm to Mitigate Transient Decaying DC Offset

CARDIOWATCH: A SOLUTION FOR MONITORING THE HEART RATE ON A MOBILE DEVICE

Proofreadi. Optimal ROI Determination for Obtaining PPG Signals from a Camera on a Smartphone. Keonsoo Lee*, Yun-Cheol Nam** and Yunyoung Nam

DIGITAL COMMUNICATION

Research on an anti-motion interference algorithm of blood oxygen saturation based on AC and DC analysis

Multi-Parameter Monitoring Data Acquisition System for SpO 2 Signals

medlab One Channel ECG OEM Module EG 01000

PRODUCT SHEET

PRODUCT SHEET

Choosing an Oscilloscope

An Introduction to the Spectral Dynamics Rotating Machinery Analysis (RMA) package For PUMA and COUGAR

DETECTING ENVIRONMENTAL NOISE WITH BASIC TOOLS

NIH Public Access Author Manuscript Opt Express. Author manuscript; available in PMC 2009 July 29.

Introduction to Signal Processing D R. T A R E K T U T U N J I P H I L A D E L P H I A U N I V E R S I T Y

Smart Lighting Activities

Research Article. ZOOM FFT technology based on analytic signal and band-pass filter and simulation with LabVIEW

NanoGiant Oscilloscope/Function-Generator Program. Getting Started

6.111 Project Proposal IMPLEMENTATION. Lyne Petse Szu-Po Wang Wenting Zheng

A Matlab toolbox for. Characterisation Of Recorded Underwater Sound (CHORUS) USER S GUIDE

Simple Harmonic Motion: What is a Sound Spectrum?

ECE 4220 Real Time Embedded Systems Final Project Spectrum Analyzer

MIE 402: WORKSHOP ON DATA ACQUISITION AND SIGNAL PROCESSING Spring 2003

DATA COMPRESSION USING THE FFT

Getting Started with the LabVIEW Sound and Vibration Toolkit

IFM65UG OPS-COMPLIANT 16/7 400 NITS ULTRA HD INTERACTIVE FLAT PANEL DISPLAY

Spectrum Analyser Basics

EMI/EMC diagnostic and debugging

Introduction to GRIP. The GRIP user interface consists of 4 parts:

Haptic, Acoustic, and Visual Short Range Communication on Smartphones

Introduction. Edge Enhancement (SEE( Advantages of Scalable SEE) Lijun Yin. Scalable Enhancement and Optimization. Case Study:

ni.com Digital Signal Processing for Every Application

EE-217 Final Project The Hunt for Noise (and All Things Audible)

Different Approach of VIDEO Compression Technique: A Study

Audio and Video II. Video signal +Color systems Motion estimation Video compression standards +H.261 +MPEG-1, MPEG-2, MPEG-4, MPEG- 7, and MPEG-21

Robert Alexandru Dobre, Cristian Negrescu

POST-PROCESSING FIDDLE : A REAL-TIME MULTI-PITCH TRACKING TECHNIQUE USING HARMONIC PARTIAL SUBTRACTION FOR USE WITHIN LIVE PERFORMANCE SYSTEMS

technical note flicker measurement display & lighting measurement

Stark Spectroscopy Deanna s Experimental Procedure NWU Hupp Lab Fall 2003

Agilent E5500 Series Phase Noise Measurement Solutions Product Overview

Major Differences Between the DT9847 Series Modules

Real-time EEG signal processing based on TI s TMS320C6713 DSK

PHOENIX Finds every leak. Now with an even fi ner nose.

1.1 Digital Signal Processing Hands-on Lab Courses

Musical Hit Detection

WHALETEQ PPG Heart Rate Simulator Test System (HRS200) User Manual

IoT Toolbox Mobile Application User Manual

Vascular. Development of Trinias FPD-Equipped Angiography System. 1. Introduction. MEDICAL NOW No.73 (2013.2) Yoshiaki Miura

2 MHz Lock-In Amplifier

RSNA 2006 November 26 to December 1 Chicago. Guest author for ImPACT Dr. Koos Geleijns, Medical Physicist, Leiden University Medical Center.

Noise. CHEM 411L Instrumental Analysis Laboratory Revision 2.0

New Medical Light Source using NTT s Communication Laser Technology

AN ARTISTIC TECHNIQUE FOR AUDIO-TO-VIDEO TRANSLATION ON A MUSIC PERCEPTION STUDY

Investigation of Digital Signal Processing of High-speed DACs Signals for Settling Time Testing

Real-time QC in HCHP seismic acquisition Ning Hongxiao, Wei Guowei and Wang Qiucheng, BGP, CNPC

Department of Electrical & Electronic Engineering Imperial College of Science, Technology and Medicine. Project: Real-Time Speech Enhancement

Healthcare AYASE HEART HOSPITAL. Japan

TECHNICAL SPECIFICATIONS, VALIDATION, AND RESEARCH USE CONTENTS:

Experiment 13 Sampling and reconstruction

CSC475 Music Information Retrieval

AC : A SMALL, HIGH-FIDELITY REFLECTANCE PULSE OXIMETER

An Integrated EMG Data Acquisition System by Using Android app

BIOFY Opto-Mechanical Integration Application Note draft version - subject to change without notice

SERIES H: AUDIOVISUAL AND MULTIMEDIA SYSTEMS Infrastructure of audiovisual services Coding of moving video

Spectral Decomposition in HRS

Pre-processing of revolution speed data in ArtemiS SUITE 1

Sound and Vibration Data Acquisition

HDMI Over IP Extender Kit - 4K

Re: ENSC 370 Project Physiological Signal Data Logger Functional Specifications

Ch. 1: Audio/Image/Video Fundamentals Multimedia Systems. School of Electrical Engineering and Computer Science Oregon State University

Supplementary Information

PS3$and$Physics$E.1bx$ Lab$2:$EKG$and$Sound$ 2015$ $

Lab experience 1: Introduction to LabView

Real-time Chatter Compensation based on Embedded Sensing Device in Machine tools

Images for life. Nexxis for video integration in the operating room

APP USE USER MANUAL 2017 VERSION BASED ON WAVE TRACKING TECHNIQUE

Spectral Sounds Summary

HBI Database. Version 2 (User Manual)

Computer Systems Architecture

A Parametric Autoregressive Model for the Extraction of Electric Network Frequency Fluctuations in Audio Forensic Authentication

PRELIMINARY INFORMATION. Professional Signal Generation and Monitoring Options for RIFEforLIFE Research Equipment

supermhl Specification: Experience Beyond Resolution

Digital Audio Design Validation and Debugging Using PGY-I2C

A Parametric Autoregressive Model for the Extraction of Electric Network Frequency Fluctuations in Audio Forensic Authentication

Processing. Electrical Engineering, Department. IIT Kanpur. NPTEL Online - IIT Kanpur

DIGITAL INSTRUMENTS S.R.L. SPM-ETH (Synchro Phasor Meter over ETH)

PS User Guide Series Seismic-Data Display

Voice Controlled Car System

1ms Column Parallel Vision System and It's Application of High Speed Target Tracking

HEART ATTACK DETECTION BY HEARTBEAT SENSING USING INTERNET OF THINGS : IOT

ONLINE ACTIVITIES FOR MUSIC INFORMATION AND ACOUSTICS EDUCATION AND PSYCHOACOUSTIC DATA COLLECTION

Dolby MS11 Compliance Testing with APx500 Series Audio Analyzers

Standard Operating Procedure of nanoir2-s

About OMICS Group Conferences

What s New in Raven May 2006 This document briefly summarizes the new features that have been added to Raven since the release of Raven

BeneHeart R3. Electrocardiograph

Appendix D. UW DigiScope User s Manual. Willis J. Tompkins and Annie Foong

ECE438 - Laboratory 4: Sampling and Reconstruction of Continuous-Time Signals

Troubleshooting EMI in Embedded Designs White Paper

Transcription:

Extracting vital signs with smartphone camera Miguel García Plo January 2016 PROJECT Department of Electronics and Telecommunications Norwegian University of Science and Technology Supervisor 1: Ilangko Balasingham Supervisor 2: Seyyed Hamed Fouladi

i Abstract Due to the large number of smartphones there today, it makes almost everyone has in his hand an unimaginable amount of information, assistance, entertainment... In this project we talk about an important issue such as e-health.. We boarded the possibility to inform a patient of a vital sign as is the heart rate. We will use an app for Android operating system, the operating system most currently used.in this way we can reach a large audience without any charge, just by downloading a free app. This app has been developed thanks to the electronics department and supervisors Hamed and Ilangko. Trondheim, 2016-01-21 Miguel García Plo

Contents Abstract................................................ i 1 Introduction 2 2 Theory 3 2.1 Background on photoplethysmography.......................... 3 2.2 Implementation of the algorithm.............................. 4 3 Android App 7 3.1 Inner workings........................................ 7 3.2 User experience........................................ 8 4 Summary 10 4.1 Summary and Conclusions................................. 10 4.2 Recommendations for Further Work............................ 10 A Code 12 Bibliography 13 1

Chapter 1 Introduction The objective of this project is to determine a vital sign of a person through the camera of a mobile device and an application for that mobile. The technique used is called Photo-plethysmography (PPG). Plethysmography is the technique for detecting cardio vascular pulse wave traveling through the human body. The application developed is called HR detector. This application is written primarily in Java and some C ++. The reason is written in Java is mainly because it is based on the Android mobile operating system. Mainly it used the open source OpenCV library. This library is also available for different programming languages such as C ++ and Python. Users may itself get your own heartbeat with its own device. The device must have front camera, so the user is able to time as his face has been detected and can finally see his heartbeat on the device screen. To use the HR detector application, previously we have to download the OpenCV Manager application. With OpenCV Manager in our device we will have the latest OpenCV libraries for our hardware. Of course the PPG (photoplethysmography) technique is not 100% reliable. In our case, certain factors come into play by the device such as the quality of the front and camera hardware device. There are also other factors external to the device such as the light in the place where they are performing data collection or characteristics of the person using the app. 2

Chapter 2 Theory The content of this chapter describes what photoplethismography (PPG) is and what can be expected from the implementation presented in this report. 2.1 Background on photoplethysmography From the Greek word plethysmos to increase, plethysmography means [...] finding variations in the size of a part owing to variations in the amount of blood passing through or contained in the part. Plethysmography refers to the technique for detecting cardio vascular pulse wave traveling through the human body measuring pulsatile tissue volume directly. Arterial pulsations are the most significant reason for volume changes. Capillaries are largely non-compliant and will register only minor pulsations. The plethysmogram is used as an indirect measure for arterial blood pressure (ABP). [1] With a digital camera in movie mode using ambient light Photo-plethysmography signals can be measured remotely or internally. PPG is based on the principle that blood absorbs more light than surrounding tissue so variations in blood volume affect transmission or reflectance correspondingly. In red blood cells, one of the major components is oxygen carrying protein, hemoglobin, pigmented with red color. This characteristic makes the light properties of blood different from surrounding tissues. The hemoglobin absorption spectra give us a key factor in our application. As we can see in Figure 2.1, the absorption is highest for the green part of the spectrum and 3

CHAPTER 2. THEORY 4 Figure 2.1: Absorption spectra. it is lowest in the blue part. PPG signals can be divided in two parts: DC component and AC component. - DC component: A constant voltage offset determined by the nature of the material the light passes through. -AC component: Component synchronous to the heart rate. The AC component of PPG pulse shapes are indicative of vessel compliance and cardiac performance. In the AC component of PPG signal we can see the changes by fluctuations due to blood flow with the highest amplitude values in the areas with highest absorption. Our analysis is based on the statistical signal processing theory and the knowledge about the hemoglobin absorption spectra. 2.2 Implementation of the algorithm The Implemented algorithm is described in the figure 2.2. The first step in order to get the heart rate is to select in the captured frame the Region Of Interest (ROI). In our case, we are looking for faces, specifically, the forehead, in which we can better detect the skin. The face detection will be done thanks to OpenCV library. Using RGB colour map, the green colour is detected. This channel is chosen because the oxygen filed hemoglobin absorbs more of the green light, as we can see in Figure 2.1. After detecting the green colour in the ROI, all the green values in the ROI in one frame

CHAPTER 2. THEORY 5 Figure 2.2: Flowchart. is summed to one sample. This is repeated for all the frames, before the average value of all these samples are used to remove the DC. Filtering the redundant frequency components, the optimum one is chosen as the frequency with the highest power spectral density. The heart rate is then obtained by converting from frequency to bpm. There are some algorithms that have been tested and proven as: FFT, MUSIC, ESPRIT or AR (Autoregressive mode). Chosen for their easier implementation in the Java language has been FFT. The fast Fourier transform is a mathematical method for transforming a function of time into a function of frequency. Sometimes it is described as transforming from the time domain to the frequency domain. It is very useful for analysis of time-dependent phenomena.[2] The most used FFT algorithm is the Cooley-Tukey algorithm, which consists on dividing the transform into many smaller DFT. This algorithm can be combined with as Prime-factor FFT or Bruun s FFT algorithm. In the Figure 2.3 we can see the result of having applied the FFT.

CHAPTER 2. THEORY 6 Figure 2.3: FFT result.

Chapter 3 Android App The content of this chapter is to describe the app to get the heart rate of a person.the app developed is called HR detector and is based on Android operative system. In these lines we will explain how the HR detector application works internally and from the point of view of the user experience. The mobile device that has performed the tests and trials has been a Samsung Galaxy S4 LTE GT-i9505 16GB. Mention that to make use of the application, the mobile device must have mandatory front camera. 3.1 Inner workings As mentioned above, this application is developed for the Android operating system, the company owned by Google. See Figure 3.1.a. The chosen IDE is eclipse with ADT (Android developer tools) package. See Figure 3.1.b. With this package will be possible to compile and debug during application development. The OpenCV (open source) facilitates the task library for face detection. This library is written in C ++ and Java, last language has been used for the development of the app. OpenCV is a popular among professional image processing due to its variety of features and availability in different languages library. After the face detection and the detection of the forehead, we store it in a signal, the mean green channel of the pixels. It is normalized signal is filtered with a filter between 0.4 and 3 Hz. Once the signal is filtered use the Fast Fourier Transform (FFT) for frequency, and from there to get the heart rate (BPM). The signal to which it will perform FFT has 7

CHAPTER 3. ANDROID APP 8 contains 256 samples (frames). The result (BPM) will be displayed on a toast. This method is useful to give instant information. As is obvious, with better hardware, speed up the process of getting the heartbeat, because of the way the app is developed, reaching more number of frames per second (fps) we get the result in a faster way. (a) Android logo (b) eclipse logo Figure 3.1: Android and eclipse IDE 3.2 User experience The user experience begins with the previously installation of the app called OpenCV Manager. This application will provide our mobile device the necessary libraries to run our app. OpenCV Manager can be downloaded free from GooglePlay. Once you have installed the application OpenCV Manager, we can proceed to install HR detector. At this time we have ready the hardware and software. To start the application have to click the icon itself, see Figure 3.2. By clicking the icon, the front camera is activated and can see on the screen what you are capturing. We must place the mobile device in landscape mode. We should leave the device in a place where it will not move. If this is not possible it is recommended to hold the phone with both hands to give greater stability. Instantly our face is detected and can see a red box in our forehead. Inside this box it is where the data necessary are taken to determine the heart rate. See Figure 3.3. After a wait of about 8 seconds, depending on the power device, the result will be displayed, or in other words, the heart rate data. See Figure 3.4. After another eight seconds we will get a

CHAPTER 3. ANDROID APP 9 Figure 3.2: App icon. Figure 3.3: Forehead detected. new heart rate data. If the user wants to leave the application you must press the "return" key once. Figure 3.4: BPM.

Chapter 4 Summary and Recommendations for Further Work 4.1 Summary and Conclusions Thanks to this project work I have learned about a technique such as the photoplethysmography. Combining the technique mentioned with the development of an app has been a challenge that I managed to develop new skills in Java and management of biomedical signals. The possibility of bringing anyone the ability to measure their heartbeat, with the camera of a mobile device we all carry over, I had not believed months ago. Of course the result has not an accuracy of 100%, but after some improvements discussed in the next section, they can make an application with a high percentage of reliability. 4.2 Recommendations for Further Work A good way to give more precision to the end result would be implementing a tracker so that the red box automatically follow our forehead. In this way we could obtain more reliable data of our skin and a more accurate result. Another way to improve the application, not from a technical point of view, it would include the option to submit our results to a qualified person to the health sector, a doctor for example. First would be created one database registered with our results, then the results could be sent 10

CHAPTER 4. SUMMARY 11 via email to our digital medical account. Medical personnel may have access to our data without the patient having to move to the health center or hospital.

Appendix A Code The code is hosted on GitHub, who want to see and use the code is enabled to do it. GitHub https://github.com/maxim467/hr_project 12

Bibliography [1] M. Hirai, S. Nielsen, and N. Lassen. Blood pressure measurement of all five fingers by strain gauge plethysmography. Scandinavian journal of clinical and laboratory investigation, 36(7):627 632, 1976. [2] Nave. Fft, 2006. 13