1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Getting Heart rate through iOS

Discussion in 'iPhone/iPad Programming' started by ashwinr87, Feb 17, 2012.

  1. macrumors member

    I am trying to figure out a way to create an iOS app to measure Heart rate but I am unable to get a start on how to proceed with it.

    I read that it could be possibly done using accelerometer or using the camera with the flash to see the blood flow( though I dont know how that works).

    Would anyone be able to help me with this or point me at a right direction so that I would be able to figure out what to do?
  2. macrumors 68000


    You would need to write a pretty fancy filter to pull heart beats out of the accelerometer, but it could probably be done. It's a pretty sensitive device.

    I don't think you could do it with the video camera and led light on though - but I have seen medical instruments that do this.

    You might be better off developing add on hardware and using a finger sensor.
  3. macrumors 601

    There are already several HR monitors available on iOS. I've never used them, but the best reviewed ones typically use the camera to view the change in color in your finger tip. They seem to work better on iOS devices that have the LED flash.

    If you want to know the science behind it, do some research on pulse oximeters. These are the devices that they use in hospitals to get a continuous readout on your heartrate.

  4. macrumors member

    yeah... I am thinking about the option of adding hardware and then getting reading from that... thanks for the reply..


    ok.. thanks for the reply...

  5. macrumors 601

    Here's a link to an Android app that measures HR using the accelerometer. Can't vouch for the accuracy.


    There may be some iOS apps that do it this way too.
  6. macrumors member

    Here is a good app for both iPhone and Android - Instant Heart Rate. It is very accurate and so I am trying to figure out how to design a similar thing..

  7. macrumors 603

    This has nothing to do with the OS. You would start by carefully studying the sensitivity and range of all the possible physical sensors (both internal sensors and external accessories), and any digital signal processing, AI pattern matching and statistical analysis needed to process the results.
  8. macrumors 603


    Then there's always the option of just telling the user to hit a button to start a timer and start counting the beats right then, and then telling them to enter how many they counted at the end. Provide instructions for how best to count.

    If you insist on using hardware, I feel like if you press your finger against the camera with the flash turned on, your finger will pulse how red it is with each heartbeat. So if you just access the average color from the camera, that might work.
  9. macrumors 603

    Maybe after you do some image processing, signal processing, autocorrelation and other data reduction (etc.) and analysis to determine if there are any measurable changes that have statistically valid and bounded periodicity estimate in the expected range.

  10. macrumors 6502a

    That's really amazing that they can use the camera to detect subtle color changes like that. I had no clue the camera was that powerful.

Share This Page