PDA

View Full Version : tracking head rotation orientation


VAmanda
09-21-2005, 02:26 PM
is there a way to track head rotation to see if a subject is nodding (rotating in x) or shaking (rotating in y)? our idea right now is to keep the last 20 rotation values in a list and then do some sort of comparison between these values to determine how the head is moving. is there a better way to track nodding or shaking behavior?

farshizzo
09-21-2005, 03:43 PM
Hi,

I've attached a sample script that can detect head nods and shakes. The attached zip file contains two files. The file vizmotion.py is a python module that contains the code for detecting head nods and shakes. The file testNodDetection.py is a test script which shows how to use the module. The test script will connect to an intersense and print out when the head motion has changed state. There are currently 3 states:

vizmotion.HEAD_NODDING - head moving up/down
vizmotion.HEAD_SHAKING - head moving left/right
vizmotion.HEAD_NEUTRAL - head not moving

Let me know if this doesn't help

VAmanda
09-21-2005, 04:24 PM
Thanks for the example code...it seems like it's exactly what we needed. Unfortunately, when we try to run it, it's coming up with an error in the vizmotion.py script on line 8, which is:

HEAD_MOTION_EVENT = viz.eventid('HeadMotionDetectorEvent')

The error reads:

AttributeError: 'module' object has no attribute 'eventid'

Is there something we're doing wrong? Thanks for your help.

farshizzo
09-21-2005, 04:57 PM
Hi,

You will need version 2.53f or above to use this script. Which version do you have? If you do not want to update to the latest version then I can modify the script to work with your version.