DIY-Webcam Video Magnification

Vor einem Jahr bloggte ich über die Eulerian Video Magnification, das Video ging vor ein paar Wochen nochmal rum, dürftet Ihr mitbekommen haben. Kurzversion: Das ist eine Art Vergrößerung für minimale Bewegungen in Videos, damit kann man beispielsweise Puls sichtbar machen. Und jetzt hat Github-User thearn eine DIY-Variante davon online gestellt, die dasselbe für Webcams bietet. Ich bin gespannt, wie lange das online bleibt, die hatten sich ihre Eulerian Video Magnification damals patentieren lassen.

This application uses openCV to find the location of the user’s face, then isolate the forehead region. Data is collected from this location over time to estimate the user’s heartbeat frequency. This is done by measuring average optical intensity in the forehead location, in the subimage’s green channel alone (a better color mixing ratio may exist, but the blue channel tends to be very noisy). Physiological data can be estimated this way thanks to the optical absorbtion characteristics of (oxy-) hemoglobin (see http://www.opticsinfobase.org/oe/abstract.cfm?uri=oe-16-26-21434).

With good lighting and minimal noise due to motion, a stable heartbeat should be isolated in about 15 seconds. Other physiological waveforms, such as Mayer waves (http://en.wikipedia.org/wiki/Mayer_waves), should also be visible in the raw data stream.

Once the user’s pulse signal has been isolated, real-time phase variation associated with the detected hearbeat frequency is also computed. This allows for the heartbeat frequency to be exaggerated in the post-process frame rendering; causing the highlighted forhead location to pulse in sync with the user’s own heartbeat.

webcam-pulse-detector (via HackerNews)