Heart-Beat Rate From Finger Video Estimator


This estimator enables you to calculate the user’s heart rate from a short video of their finger taken from the smartphone’s front camera with the flash turned on. The estimator implements an algorithm described in . Figure 1 shows us the results of the heart rate estimator in the form of an error histogram. ‘Raw’ dataset includes all of the data collected, while the ‘Outlier Removal’ dataset has removed poor data points in which a noisy or invalid signal was captured from the finger image. The ground truth measurement was taken with a Bluetooth blood pressure monitor by A&D (UA-651BLE).

Error Histogram Summarizing Results Obtained

Figure 1: Error Histogram Summarizing Results Obtained


In order to estimate the user’s heartbeat from a finger-video estimator, the device must support a back-facing camera. Before starting the estimator, we check if this prerequisites are satisfied by calling the function  reqSatisfied() . The function will throw an  ExtractorPrerequisiteUnsatisfiedException if the prerequisite isn’t met. Otherwise, the function will return void  and we can move onto starting the extractor. We can accomplish this with a try-catch statement:

Make A Fragment

The camera used by the estimator takes the form of a Fragment  in an Android Activity. For setting it up in your app, make a Fragment  for the camera in a RelativeLayout  or LinearLayout  in your Activity as shown here.

Initialize The Estimator

The Activity must extend the  FragmentActivity and the estimator and it’s associated encapsulator can be initialized as follows:

Within the  OnCreate function you need to tie the estimator to the camera fragment. To do this, add:

Don’t forget to add the required permissions in the Android Manifest and ensure that your screen orientation is locked on either portrait or landscape mode for the duration of the activity.

Add a listener to the encapsulator if required.

Start The Estimator

The last step to start the estimator. This can be done by overriding the OnResume  function. In order to complete the activity life cycle, we stop the estimator by overriding the OnPause  function.

Your heart-rate estimator is now ready to run!

Finger Video HR Estimation

Figure 2: An example screenshot of the estimator in action.

Running Example

(TODO: complete)


Chandrasekaran, V., R. Dantu, S. Jonnada, S. Thiyagaraja, and K. P. Subbu. 2013. “Cuffless Differential Blood Pressure Estimation Using Smart Phones.” IEEE Transactions on Biomedical Engineering 60 (4): 1080–89. https://doi.org/10.1109/TBME.2012.2211078.