Use Fitlet as an Optical Heart Rate Monitor in Linux Mint

Application notes using fitlet. Credit goes to user Hassellbear for publishing more than enough cool application notes to justify a dedicated sub-forum.

Moderator: hassellbear

Post Reply
Posts: 106
Joined: Mon May 28, 2012 12:25 pm

Use Fitlet as an Optical Heart Rate Monitor in Linux Mint

Post by hassellbear »


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.
GenericPulse.png (53.33 KiB) Viewed 7342 times


The required hardware consists of:

1. Fitlet
2. Webcam
Hardware.jpeg (28.73 KiB) Viewed 7342 times


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:

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:

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:

For OpenMDAO installation instructions see: ... stall.html

To obtain OpenMDAO software see:

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:


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.
RealData.jpeg (170.14 KiB) Viewed 7338 times


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.


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

2. Fitlet again demonstrates its capabilities and versatility.

Post Reply

Return to “Cool stuff with fitlet”