Skip to content

KINGPIN1771/Heartmonitor

Repository files navigation

Heartmonitor

Heartmonitor is an Android based heart rate monitor which uses the camera and its flash to determine the users heart rate in beats per minute.

demo

Now updated to support latest android version with AndroidX Libraries.

How it works

  • The user enters his/her age and then measures his/her resting heart rate which gets stored in the app.
  • After/During a workout, the user measures his/her heart rate again.
  • The app then calculates the user’s maximum heart rate, target heart rate and heart rate reserve.
  • The app also indicates the cardio-zone the user is in which helps the user to determine the efficiency of his/her workout.
  • Thus the user can monitor his/her health with just a basic Android phone and no external devices.

Image Processing

The app uses the phones built-in camera to track color changes on the fingertip that are directly linked to your pulse. When the index finger is placed on the lens, the camera will pick up very coarse data. The app uses the PreviewCallback mechanism to grab the latest image from the preview frame. It then processes the YUV420SP data and pulls out all the red pixel values. A big jump to the peak value is seen when the heart beats.

Formulae used

  • Resting Heart Rate (RHR)
  • Maximum Heart Rate (MHR): 220 - age
  • Heart Rate Reserve (HRR): MHR - RHR
  • Target Heart Rate (THR): THR = ( (MHR - RHR) x %intensity ) + RHR (Karnoven's Formula)

References

About

Heart Rate Monitor Application for Android using Camera and Flash using PPG principle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published