androidcameraheartbeatbeat-detection

how to indentify finger is on the camera lens or not in android?


I am trying to measure Heart Beat using the camera in android device.

As far as i see, Placing your finger tip on the camera lens and watching the changes in frames in camera. I have tried the application here but it does not seem to be correct.


Solution

  • Please check This Post on Google Code

    http://code.google.com/p/android-heart-rate-monitor/issues/detail?id=1#c22

    It Explains how to check finger is on the camera or not.

    "For anyone interested, I figured out how to detect whether the user has his finger placed on the camera or not. In the imageProcessing.java, in the decodeYUV420SPtoRedAvg() method, we calculate the average value of the pixels of the red color. Doing a small experiment, I found out that when the user has his finger placed on the camera lens, the average has a value of > 200. In other cases, the average value is <200. thus, in the HeartRateActivity you can add an if statement after the call of the decodeYUV420SPtoRedAvg(), to find whether the value returned is >200 or < 199. You can use this to display an alert box or something similar to guide the user to place his finger on the camera lens."