Heartrate

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Heart Rate Measurement on Android Platform

Sasivimon Sukaphat, Sukapon Nanthachaiporn, Kritsadayu Upphaccha, Pinta Tantipatrakul


Department of Mathematics, Faculty of Science
Srinakharinwirot University
Bangkok, Thailand, 10110
E-mail: {sasivimon, sc541010374, sc541011112, sc541011142}@g.swu.ac.th

Abstract— This paper proposes a methodology to measure a blood volume. The acquired frames and their histograms of
heart rate using photoplethysmogram (PPG) — a technique that RGB channels were computed for finding their means and
uses infrared light to detect changes in the blood flow volume in distributions. According to [2, 3] and our experiment results,
tissues. We present a new application of the Android the red channel which provided the strongest PPG signal was
smartphone’s camera equipped with LED flash which used for selected for detecting the correct fingertip placing frame and
recording the intensity of light from the fingertip blood volume. for computing heart rate.
The red channel of RGB signals in each picture frame recorded
by smartphone returned the plethysmographic information. This Remaining section of the paper are organized as flows:
contextual information will be converted into time domain signal Section II discusses related work; Section III details the
by using Fast Fourier Transform (FFT) for further used in heart implementation of the heart rate measurement system; Section
rate estimation process. The final results is the heart rate of each IV describes the experiments conducted and discussion result.
person recorded within 40 seconds. Section V concludes and suggests future directions for the
paper.
The experimental results conducted by 10 testers indicated
that there is no obvious difference between heart rate measured
by our system and by a digital pressure monitor with 0.57 II. RELATED WORKS
percent discrepancy. Photoplethysmogram is not a new technique for measuring
pulse wave. In 1938, Hertzman [4] described a new technique
Keywords—Photoplethysmogram, pulse wave measurement, that recognized the pulse wave form changes by sending an
heart rate estimation, smartphone, non-invasive monitoring. infrared light into the tissue and then measured the amount of
light absorption corresponds with the variation of the blood
I. INTRODUCTION volume. This technique called photoplethysmogram (PPG)
The most common method of clinical pulse measurement is which later implemented on smartphone by many researchers.
by means of using the stethoscope, digital pressure monitor and This technique presents the simple and low-cost optical based
electrocardiography (ECG). These equipment provide technology that used camera on a smartphone to record the
fundamental quantitative information on arterial pulse for pulse in the fingertip.
estimating heart rate, blood pressure and help diagnosing the Pulse rate detection based on photoplethysmographic
cardiovascular risk of each person. Although such equipment technique was further implemented on smartphone by many
are necessary to use for checking the activity of our heart, they researchers. In 2010, Pelegris et al. [5] presented a new
are not easy to use by non-clinical workers and inconvenient to technique to measure heart rate using Nokia N95. They
carry. Although we can measure our pulse by pressing finger developed a system that analyzed the brightness information of
on the body where an artery is close to the surface, this the grayscale portion in each recorded frame, while the tester
technique required much experiences and skills. It should be pressing his/her finger on the lens. At the same time, Jonathan
better if we can find an alternative way for monitoring heart and Leahy [6] proposed a method to detect pulse rate by using
rate by using an equipment which we use in our everyday life. Nokia E63. Although they found the green channel gives a
Today, smartphones become increasingly popular and stronger PPG signal than the red one, the latter works [2, 3] and
equipped with high-end processors and high-resolution the result from our experiment found that the red channel gives
cameras. Motivated by these diverse capabilities of smart the best prominent characteristic for indicating the heart rate.
phones, we focus on utilizing them for biomedical applications. In addition, the works of [2, 3] also selected the central region
In this paper, we introduce an alternative way to measure heart of interest measuring 10 x 10 pixels for computing the mean
rate by applying smartphone-based photoplethysmogram intensity value. The Fourier transform spectral analysis also
(PPG) acquisition. PPG is an optical technique which can be used in their system in order to assess the heart rate.
used to estimate blood volume changes of an organ. By the At a later time, the photoplethysmographic pulse wave
assumption of PPG that skin illumination with penetrating measurement was implemented on Android platform by Scully
optical radiation can be detected the signal by a photodetector et al. [7]. They use Motorola Droid smartphone to record the
[1], we can use Android smartphone’s camera equipped LED physiological parameters in the green channel region of each
flash for recording the intensity of light from the fingertip 50x50 pixel frame. This contextual information will be used to
The work in this project has been supported by Grant No.659/2558 from
Faculty of Science, Srinakharinwirot University, Thailand.

978-1-4673-9749-0/16/$31.00 ©2016 IEEE


compute the PPG value which used in heart rate estimation Our system concerns about two main tasks: 1) PPG
process. This research also used the red and blue channels to imaging that grabs frame of fingertip obtained from
detect the oxygen saturation. The experiment result compared smartphone and 2) RGB color analysis that will be further
to medical instrument, Masimo Radical SETTM, shown the used in the heart rate estimation process. In the first task, the
high correlation and the validity of heart rate smartphone frame obtained from smartphone in YUV color format will be
measurement. converted into RGB color format which can be used to
Even all above researchers claim that their experiment analyses the histograms of red, green and blue channels which
results shown the effectiveness of their system, they do not shown in Fig 2. Since the fingertip does not fix on the lens, it
mention to the problem of finger movement which effects to can shift from the proper position and drop its pressure on the
the validity of the heart rate measurement. In order to solve this lens. Therefore, we have ensure the area of the finger pressing
problem, we applied the movement detection method of fits the image boundaries. In order perform fingertip placing
Kurylyak et al [3] which performs by analyzing the color verification, we modified the verification color distribution
cluster in the RBG color space of the finger image. threshold proposed by Kurylyak et al. [3]. The range of mean
The experiment result shown that the heart rate acquired from a and distribution of RGB color range in our thresholds are
digital blood pressure monitor and our application are not described as below:
significant different with 0.57 percent discrepancy. Therefore,
we can conclude that the accuracy of our pulse measurement mean(Red) – σRed > 128,
application was similar to one acquired from the medical
instrument. mean(Green) + σGreen > 10 and < 128,
mean(Blue)+σBlue < 128
III. IMPLEMENTATION
* The distribution of each color must greater 40
The processes of measuring heart rate using PPG technique
are discussed in detail in this section. The Android smartphone This modification thresholds constructed from our
was used in the fingertip image capturing process. The
investigation of RGB color histogram in each captured frame.
workflow of overall system is presented in Fig.1.
These thresholds will perform in case that LED is used. We
mo found that the color distributing in the channels of the error
frames rules usually spread out of the ranges: 1) the red
channel of each error frame has pixel values that concentrated
in the lower half of its value range, 2) the green channel of
each error frame has pixel values that less than 10 or
concentrated in the higher half of its value range and 3) the
blue channel of each error frame has pixel values that
concentrated in the higher half of its value range. Any frame
that has a mean and distribution of RGB color fits in this range
is determined as a correct frame will present a central region
of fingertip shown in Fig.3 (a). The correct frames will be
further collected into an array. Some example of correct and
incorrect fingertip placing frame are shown in Fig.3 which
obviously seen that the red channel provides the most
outstanding PPG signal.

(a) (b) (c)

Fig. 2. Histogram of the correct fingertip placing frame: red channel (a),
green channel (b) and blue channel (c).

Although claimed in [6, 7] that the green channel provides


the strongest character of blood volume changes at the
fingertip. On the other hand, [2, 3] and our experiment show
Fig. 1. Workflow of the pulse wave measurement system. that the histogram of red channel is the most prominent
characteristic compared to the other color channels (Fig.2).
Furthermore, the distribution of the pixels of red channels he/she held the smartphone. Each picture frame size is 320 x
remains similar for different smartphones while the green and 240 pixels and will be grabbed 30 frames per second. From the
blue channels is not uninform [2, 3]. Therefore, only the mean experiment result of [8] shown that the pulse counting duration
values of the red channel will be collected in array for using in which less than a full minute is acceptable. Therefore, we
heart rate estimation process. conduct a pulse counting duration within 40 seconds which
equivalent to a pulse counting duration performed by digital
blood pressure. The testers had to perform the experiment for 2
mean(Red) = 244.72,
rounds and in each round they had to start the digital blood
= 16.65, pressure monitor application by pressing on the start button
mean(Green) = 26.51, which shown in Fig.5 (a). In case that the incorrect frame was
found, the screen will display an error message which shown in
= 4.54, Fig.5 (b) and they had to start pressing fingertip again. In order
mean(Blue) = 6.00, to compare our application’s result with the digital blood
= 9.52 pressure monitor’s result, the testers had to cuff on their upper
arm on the same side as they held the smartphone. The
measuring process of both devices performed at the same time.
(a) In this period, the screen will show the current estimated pulse
mean(Red) = 167.53, included with the PPG graph which shown in Fig.5 (c).
= 50.8,
mean(Green) = 49.14,
= 4.54,
mean(Blue) = 6.00,
= 9.52

(b)
(a)
Fig. 3. Examples of a correct fingertip placing frame (a) and
incorrect fingertip placing frame (b). .

The frame acquisition processes perform within 40 seconds


that is the same interval as digital pressure monitor
performed. After the frame acquisition process already
finished, the mean values in each frame of the red channel will
be convert from a time domain signal into frequency domain
signal by using Fast Fourier Transform (FFT) algorithm. Next,
we have to find the maximum magnitude of frequency for
calculating heart rate by using the formula which described as
below:

HR = (FPS x FreqIdx x 60)/N (1)


(b)
Where HR is a heart rate, FPS is a frame rate per second,
FreqIdx is the maximum frequency and N is the number of the
red channel frames.

IV. EXPERIMENTS CONDCUTED AND DISCUSSION


The experiments performed by 10 senior students of
Srinakharinwirot University both male and female between the
ages range of 20 to 22. Their heights between 151 to 178
centimeters and their weight between 42 to 88 kilograms. The
Android smartphone, OPPO N1 mini (Fig.4 (a)) was used for
capturing fingertip frame. The Omron digital blood pressure
monitor was used for comparing results to our application. First
of all, each tester had to press his/her fingertip on the camera
lens (Fig.4 (b)) and held the smartphone that faced up the i
screen (Fig.4 (c)). The testers had to sit down and put their arm (c)
on the table in the perpendicular direction. The tester had to
cover with the cuff on their upper arm and on the same side as
Fig. 4. The experiments setting: (a) OPPO N1 mini structure, (b) the position Fig. 5. Application interfaces: the start screen (a), the warning message of
to press fingertip on the phone and (c). incorrect fingertip placing screen (b), heart rate measuring screen (c) and
the fianl result screen (d).
After finish testing, the result will represent the heart rate of
the tester and the fingertip image will be changed to a black
color as shown in Fig.5 (d). The summary results, shown in
Table I, indicate that the heart rate measured from our
application was closed to one that measured from digital blood TABLE I. THE RESULT OF HEART RATE MEASUREMENT COMPARING
BETWEEN PPG TECHNIQUE AND DIGITAL BLOOD PRESSURE
pressure monitor with the average 0.57 percent. We also used
the statistical method, the paired samples test, to calculate the Blood Pressure Measurement Result
difference between the heart rate result from a digital blood Heart Rate
pressure monitor and one from our application which used PPG Tester Round
from Digital Heart Rate Percent of
technique. The results, shown in Table II, presented that the Blood from PPG Discrepancy
No. Pressure Technique
p-value is equaled to 0.237 which greater than 0.05 (α). Hence, Monitor
we can accept the hypothesis H0 that the heart rate measured 1 69 71 2.81
from PPG technique is indifferent from one that measured from 1
72 72 0
digital blood pressure monitor. 2

1 87 87 0
2
2 93 92 1.08

1 82 80 2.5
3
2 87 85 2.35

1 81 82 1.22
4
2 86 85 1.17

1 67 66 1.51
5
2 56 58 3.44

1 87 88 1.13
6
2 84 84 0

1 78 81 3.70
7
2 74 73 1.37

8 1 80 81 1.23

2 84 85 1.17
(a) (b)
9 1 97 98 1.02

2 91 91 0

10 1 68 71 4.22

2 66 67 1.49

Average Discrepancy (%) 0.57

TABLE II. THE DIFFERENCE BETWEEN TWO DEPENDENT GROUPS (PAIRED


SAMPLES TEST)

Blood Pressure Measurement t df Sig


Result (2-
Std. tailed)
Mean Std.Dev Error
Mean
Device
-0.400 1.465 0.328 -1.221 19 0.237
- App

(c) (d) V. CONCLUSION


This paper presents an alternative way to measure heart rate
by using photoplethysmogram technique. We used a
smartphone equipped with camera and LED flash to record the International Conference Intelligent Data Acquisition and Advanced
intensity of light obtained from the blood volume at fingertip. Computing Systems IDAACS’2011, pp. 88–491, September 2011.
We focus on detecting the pulse by analyzing the RGB signals [3] Y. Kurylyak, F. Lamonaca, and D. Grimaldi, “Smartphonebased
photoplethysmogram measurement,” Digital image andsignal processing
of the picture frames recorded from fingertip. Ten subjects for measurement systems, River Publishers, Aalborg, pp 135-164, 2012.
participated in the test, placing their finger on the smartphone [4] A. B. Hertzman and C. R. Spealman, “Observations on the finger
camera’s lens for recording the changes of light intensity of volume pulse recorded photo-electrically,” Am. J. Physiol., vol. 119, pp.
fingertip. At the same time, they were cuffed by a digital blood 334–335, 1937.
pressure monitor for measuring the pulse at the wrist within 40 [5] P. Pelegris, K. Banitsas, T. Orbach, and K. Marias. “Anovel method to
seconds. The experiment indicated that a heart rate acquired detect heart beat rate using a mobile phone,” The 32nd IEEE Annual
from a digital blood pressure monitor and our application were International Conference on Merging Medical Humanism and
Technology, pp. 5488–5491, 2010.
not significantly different statistically. Therefore, we can
conclude that the accuracy of our heart rate measuring [6] E. Jonathan and M. J. Leahy, “Cellular phone-based
photoplethysmographic imaging,” Journal of Biophotonics, vol. 4, no. 5,
application is similar to the result which acquired from the pp. 293–296, 2011.
digital blood pressure monitor. [7] C.G. Scully, J. Lee, J. Meyer, A.M. Gorbach, D. Granquist-Fraser, Y.
Mendelson, and H. Chon Ki. Physiological parameter monitoring from
optical recordings with a mobile phone. IEEE Transactions on
Biomedical Engineering, 59(2):303–306, 2012.
References
[8] H. Kobayashi, “Effect of measurement duration on accuracy of pulse-
counting”, Ergonomics, 56(2), pp. 1940-1944, Taylor & Francis,
[1] E. Jonathan and M. Leahy. “Investigating a smartphone imaging unit for December 2013.
photoplethysmography,” Physiological Measurement, 31(11):N79–N83,
November 2010.
[2] D. Grimaldi, Y. Kurylyak, F. Lamonaca, and A. Nastro.
“Photoplethysmography detection by smartphone’s videocamera,” IEEE

You might also like