Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Best method for breath tracking

Hey All,

I'm making a windows application that does breath tracking with a standard webcam. It detects when the user is inhaling, exhaling, and resting, and eventually I'd like to get more precise information about for example the speed and size of the breath (i.e. deep breathing or not). I currently have two prototypes using different methods and was wondering if people had input on which would be better long term.

Both detect general upward and downward movement in order to determine breath. The first is based on the motempl.c example program (which I have not been able to get running in OpenCV 3 yet, but can in earlier versions). Demo here: https://www.youtube.com/watch?v=KtVONL8S9Ic Code here: http://home.engineering.iastate.edu/~alexs/classes/2009_Spring_575X/code/09_MotionHistory/motempl.c

The other prototype I have uses Farneback Optical Flow. demo here: https://www.youtube.com/watch?v=tg0oj4ObHlc example code: http://study.marearts.com/2014/04/opencv-study-example-source-code-for.html

I'm eventually hoping to port the project into UE4 using the OpenCV plugin if that makes a significant difference.

Mostly curious to know if one of the algorithms is definitively better for this kind of tracking. Biggest priority would be to focus detection on the chest so background/other movement doesn't hurt it too much.

Thanks in advance for the help.