5

Possible Duplicate:
Detecting heart rate using the camera

I am working on detecting pulse rate in iOS. I have done some search and now I am able to read heart beats using external bluetooth device which is capable of reading heart beats. But now I am ver curious about detecting pulse using iPhone camera. I am trying to understand How it can be done? What is actual theory behind that? Can any one have an idea behind this?

According to my search I found that I need to use camera in video mode. And I need to compare each frames from that video for colour changes. When our heart pumps blood into our body, colours are changed with every pump. So how will I get that colour change using camera or is there any other way to do this?

Community
  • 1
  • 1
user1988
  • 811
  • 2
  • 8
  • 17

1 Answers1

5

Someone at MIT Media Labs beat you to it :P

http://www.cardiio.com/

Click on "How it works".

I believe the gist of it was that the app measures the amount of light reflected off your face due to increase/decrease in blood. Based on this, they can determine your heart rate.

Don't know about the underlying algorithm. If I know, I wouldn't be sitting here, I'd be writing MIT apps :D

Apparently there is a threshold that is considered a "standard" heart rate.

Studies have shown that our heart rate measurements are within 3 bpm of a clinical pulse oximeter when performed at rest in a well-lit environment (Poh et al., Opt. Express 2010; Poh et al., IEEE Trans Biomed Eng 2011).

You'll probably need some sophisticated equipment to record your results like a real heart rate measure machine so you can compare the RGB (in 255,255,255 triplets values) between different frames at different heart rate and also you have to make sure you're sitting in about the same exact environment with controlled lighting.

If you try to do it at home, you'll get no where. If the sky dims for example, you're going to get different RGBA value.

Zhang
  • 11,549
  • 7
  • 57
  • 87
  • 1
    It might be easier to track the change in color in your fingertip, neck, or any other pace where the skin is thinner, and the colorchanges are easier to track. – Martol1ni Oct 31 '12 at 08:43
  • 1
    :P Except someone else already done that too: http://www.azumio.com/apps/heart-rate/ – Zhang Oct 31 '12 at 08:47
  • Yes I know about this. Actually there are so many other applications like cardiio who has done this already. And yes once we will get the algorithm which does this then we can test it with other body parts as well ;0 – user1988 Oct 31 '12 at 09:14
  • Hi guys, Actually from the cardiio app, I understood that we need to detect light change on skin using iPhone's camera. But now I am stuck with colour comparison thing. I am using AVFoundation framework for getting images continuously, but now what should be done on next step is another big question. Any idea or suggestion?? – user1988 Nov 01 '12 at 12:19
  • glReadPixels() :P, I found this with Google: http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphone – Zhang Nov 01 '12 at 12:53
  • Check out my answer - http://stackoverflow.com/questions/9274027/detecting-heart-rate-using-the-camera/15653648#15653648 –  Mar 27 '13 at 07:24
  • HI i am also getting this issue , and i achieved the RGB colour of images now i want to calculate heart rate from those RGB colour . please suggest – jaydev Mar 27 '15 at 13:13