Wednesday, December 03, 2008

Wiimote Gesture Recognition

Up until this post, I assume that you should have played with your wiimote for some days.
You probably have tried to program something with the wiimote library that I've introduced from the previous post.
Now you might come with a question that, how to actually make sense from the data of the accelerometer on the wiimote.
So there are people doing gesture recognition with the wiimote.

I've just realized that to fully utilize the accelerometer that I actually need a gesture recognition software when I was reading the wiimote specifications at Wiili.org.
So the first library that I've discover is the Wiigee which is a java based library.

wiigee is an open-source gesture recognition library for accelerometer-based gestures specifically developed for the Nintendo® Wii™ remote controller. It is implemented in Java™ and, thus, is platform-independent. Using a third-party Bluetooth®-library wiigee allows you to define and recognize your own, freely trained gestures.

The wiigee library
  • allows you to define (train) your own arbitrary gestures,
  • recognizes these gestures with high accuracy,
  • offers an event-driven architecture with which you will be able to
  • integrate the gesture-input as easy as common mouse-input.


Here come some video demo for wiigee.








Even though I've downloaded the library but I haven't got it to work on my pc yet.
As the library require another bluetooth library for java and I've always got an exception about the bluetooth connection stuff.
If any of you manage to get it work on your pc, please don't hesistate to give me an update.


Here there is a library for C/C++ which is called Accelerometer Gesture Recognizer.
I still haven't got it work with my pc either as I still cannot manage to compile it due to unknown reason.

However, there are few alternative C/C++ libraries to it such as Accelerometer-based Gestures for Openmoko Neo FreeRunner which also works for wiimote.
This project was done under the Google Summer of Code 2008 program.



Even though I've never tried to build this library as it is written in C code though but it seems work pretty good from the video demo above.

There is another C/C++ library which is program by a Taiwanese which is WiimoteGR (I found his blog which lead me to this page anyway).
On the wiki page which is linked above, the author even describes how the library work in diagram and some pseudocode.
It is pretty good reference if you want to program a similar library.
I guess that I will use this library for my project as it works fine when I tried to train it with some gestures and have it to recognize the gesture.

Finally, here there is a C# library for those who love managed code which is Wiigle.

Wii-based Gesture Learning Environment
WiiGLE provides support for recognizing gestures based on the Wiimotes accelerometers. The current version features some basic feature calculations on the raw signal and a simple NaiveBayes classifier. To this end, it makes use of the Managed Library for Nintendo's Wiimote by Brian Peek and the Weka Data Mining Software by the University of Waikato. It provides interfaces to integrate your own feature calculations and your own classifiers.

WiiGLE provides and environment to record gestures, calculate features, train classifiers, and use the Wiimote for online gesture recognition based on accelerometer data. It features a Programming API that allows integrating your own features and classifiers.

http://mm-werkstatt.informatik.uni-augsburg.de/documents/WiiGLE/doku.php

There are some good documentations on it and even a video tutorial.
It seems pretty even though I haven't tested it out yet.


So for the few libraried above, most of them are released under LGPL license which allows you to do anything with it either open source or commercial.
This is a good sign for those who want to learn more on it.
You can just download the source code and see what the authors have done.


So now you have the gesture recognition libraries here, let's get it Rock 'n Roll!!