I need the same functionality as the application Instant Heart Rate.
The basic process requires the user to:
In fact can be simple, you have to analyze the pixel values of the captured image. One simple algorithm would be: select and area in the center of the image, convert to gray scale, get the median value of the pixel for each image and you will end up with a 2D function and on this function calculate the distance between to minimums or maximum and problem solved.
If you have a look at the histogram of the acquired images over a period of 5 seconds, you will notice the changes of the gray level distribution. If you want a more robust calculation analyze the histogram.