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: Code here:

The other prototype I have uses Farneback Optical Flow. demo here: example code:

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.