Wave Analysis -- WiiMote Acceleration

236 views Asked by At

I'm working on gesture recognition with a Wiimote using the (wonderful) WiiYourself! library. Everything is being developed in C++ (Visual Studio 2010).

I'm trying to process the acceleration vector (both magnitude and angle) for movement of the wiimote. When the individual swings it, I want to find what direction it is moving in, and with how much force.

The problem is two-fold:

  1. I need to be able to process the value for the initial acceleration of the WiiMote and not the deceleration from stopping the remote.

  2. How can I manage the constant stream of acceleration data coming from the remote to give me useful information?

I realize this is more a logical problem, but I'm having trouble getting things to come together.

2

There are 2 answers

0
Aaron Murgatroyd On

I would do this by recording a "perfect" swing and plotting the data internally then save that data in a resource inside your application and map movement over time internally in the application then compare the two using vector comparisons. Score the movement from the last X seconds for each internally stored motion and use a cutoff value for invalid movements. Then the one with the closest score gets the mark.

Once a successful motion has been detected you should mark that time span as being "used" and therefore not applicable to any more scoring (this is to stop multiple movements from being selected in one motion of the controller).

The comparison could be done by finding the mean difference in the points at key locations over time. ie. check each point at 5 millisecond intervals and determine the difference in the 3 acceleration vectors, the average of the sum of these differences can be the score. The gesture with the lowest score is the best match.

0
XTL On

For a start, you might try to capture a series of samples from different axes, maybe make some functions like vector magnitude and sum vectors and plot them all. See how the values behave as a signal.

Maybe you can see what the motions you want to observe look like in terms of values that way.