fit-PC Users Forum
https://www.fit-pc.com/forum/

Use Fitlet as an Optical Heart Rate Monitor in Linux Mint
https://www.fit-pc.com/forum/viewtopic.php?f=153&t=5771
Page 1 of 1

Author:  hassellbear [ Tue Oct 06, 2015 3:46 am ]
Post subject:  Use Fitlet as an Optical Heart Rate Monitor in Linux Mint

Overview

The new technology known as Eulerian Video Magnification (EVM) provides the ability to study very small color changes and movements using video images. Basically, EVM tracks subtle changes in images on a pixel by pixel basis. MIT has produced pioneering open source EVM software which was originally designed to monitor the vital signs of neonatal infants. It has become apparent that such software also provides the ability to detect and study micro-movements in inanimate physical structures such as buildings.

NASA has also done some pioneering work in this area as part of a crew state monitoring system. As part of that effort, NASA has developed a Webcam Pulse Detector which is the subject of this application note. The resulting software is available in github.

With the proper hardware and software, Fitlet running Linux Mint works well as an Optical Heart Rate Monitor.

Attachment:
GenericPulse.png
GenericPulse.png [ 53.33 KiB | Viewed 5370 times ]





Hardware

The required hardware consists of:

1. Fitlet
2. Webcam

Attachment:
Hardware.jpeg
Hardware.jpeg [ 28.73 KiB | Viewed 5370 times ]





Software

The main software required is:

1. Webcam-Pulse-Detector. This is a NASA developed open-source python package which optically measures pulse rate using Eulerian Video Magnification techniques.

The Webcam-Pulse-Detector Software is found here:

https://github.com/thearn/webcam-pulse-detector


Installation of Webcam-Pulse-Detector is straightforward. Simply download the .zip file and extract it in a directory of your choice.

Requisite packages for Webcam-Pulse-Detector are:

A. OpenMDAO
B. Python v2.7+
C. Python-Numpy
D. Python-Scipy
E. Pyserial
F. OpenCV v2.4+

2. OpenMDAO v10.3.2 or earlier. Versions later than 10.3.2 will not allow the Webcam-Pulse-Detector application to run due to a variable initialization error.

OpenMDAO stands for Open-Source Multidisciplinary Design, Analysis, and Optimization framework. OpenMDAO is written in python and is heavily contributed to by NASA. It operates as a virtual environment in which other applications can run.

For more about OpenMDAO see:

http://openmdao.org/

For OpenMDAO installation instructions see:

http://openmdao.org/releases/0.10.3.2/d ... stall.html


To obtain OpenMDAO software see:

http://openmdao.org/downloads/archive/


Requisite packages for OpenMDAO are:

A. python-dev (v2.7.5 or higher)
B. python-numpy (v1.6 or higher)
C. python-scipy (v.11 or higher)
D. python-matplotlib
E. gfortran




Running the Application

Running Webcam-Pulse-Detector is a 2-step process. Those steps are:

1. Start the OpenMDAO environment. To do this, navigate to the directory where OPENMDAO resides and issue the command:

. bin/activate


2. Run Webcam-Pulse-Detector. Navigate to the directory where Webcam-Pulse-Detector is located and issue the command:

python get_pulse.py

After a short delay, a webcam window will open. At that point, OpenCV recognizes and begins actively tracking the test subject's face. A green patch which represents the pulse test area also appears. Immediately open opening, the webcam view displays an estimated pulse rate. In as little as 15 seconds, a more accurate reading is displayed.

In addition, a graphical streaming data view is also available. The streaming mode is accessed by pressing the "D" key once a lock has been achieved. The real-time graphical data display includes a pulse waveform.

Attachment:
RealData.jpeg
RealData.jpeg [ 170.14 KiB | Viewed 5366 times ]







Results

The results using the Webcam-Pulse-Detector application with Fitlet were very good. OpenCV does an excellent job of tracking the test subjects face, and the pulse rates indicated were very close to the values I manually measured using a watch. I find it particularly amazing that a modestly priced system comprised of a Fitlet and a Logitech webcam can accurately determine a person's pulse using optical, non-contact methods. +1 for technology.




Conclusions

1. The Webcam-Pulse-Detector Application is a very cool application.

2. Fitlet again demonstrates its capabilities and versatility.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/