andgee - Gesture recognition for android

Search for BETA-testers and/or promote your own Application in a decent way.

andgee - Gesture recognition for android

Postby MrSnowflake » Tue Oct 07, 2008 12:15 pm

Hi all,

I ported the wiigee 3D accelerometer gesture recognition library to android. This lib lets you make 3D gestures in the air using an accelerometer enabled device. Currently you need to use buttons to check for gestures and gestures can't be saved, but it's a start :). For more info check the wiigee site.

I've tested it with a wiimote and the OpenIntents.org SensorSimulator and it seems to work. But I get an ANR when the lib is analyzing the data. But this happens in andgeetest I suspect it's not an andgee problem but an andgeetest problem. Probably the analyzing should be done in a seperate thread.

see: http://code.google.com/p/andgee/
Last edited by MrSnowflake on Thu Jan 14, 2010 6:11 pm, edited 1 time in total.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Postby ninor » Tue Oct 07, 2008 5:00 pm

Great! Thanks :)
Image AndDev: Your Android Development Community / Tutorials | Here's my Basic ToolKit
User avatar
ninor
Moderator
Moderator
 
Posts: 180
Joined: Thu Aug 14, 2008 6:30 pm
Location: Barcelona, Spain

Postby MrSnowflake » Tue Oct 07, 2008 5:40 pm

I contacted the developers of wiigee and they have some interesting stuff planned, which will definately be part of andgee.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby ninor » Tue Oct 07, 2008 7:45 pm

I'll have to buy some compatible bluetooth adapter...
I tried some time ago to do it with one little usb adapter, but unluckily it wasn't compatible.
Image AndDev: Your Android Development Community / Tutorials | Here's my Basic ToolKit
User avatar
ninor
Moderator
Moderator
 
Posts: 180
Joined: Thu Aug 14, 2008 6:30 pm
Location: Barcelona, Spain

Postby MrSnowflake » Tue Oct 07, 2008 8:13 pm

You have to find the bleusoleil bleutooth stack.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

great lib!

Postby janosch » Fri Oct 31, 2008 4:28 pm

hey mr. snowflake,

great library you have there. In the first place I had some trouble with the HardwareProvider that stores the properties. Is your andgee build for a 0.9 Android SDK? Anyway I changed some calls and it works on 1.0 now.

Now that the app runs, I am curious how to use it. I connected to the SensorSimulator Tool
(that was running on another machine) and created some easy input while holding the "T" Key.

On logcat:
----
10-31 15:18:04.362: INFO/Andgee.AccelerationStreamAnalyzer(172): Training started!
10-31 15:18:04.393: INFO/AndgeeTest(172): StateReceived learning
10-31 15:18:06.782: INFO/Andgee.AccelerationStreamAnalyzer(172): Finished recording (training)...
10-31 15:18:06.782: INFO/Andgee.AccelerationStreamAnalyzer(172): Data: 5
10-31 15:18:14.501: INFO/Andgee.AccelerationStreamAnalyzer(172): Recognition started!
10-31 15:18:14.501: INFO/AndgeeTest(172): StateReceived Recognizing
10-31 15:18:16.231: INFO/Andgee.AccelerationStreamAnalyzer(172): Finished recording (recognition)...
10-31 15:18:16.241: INFO/Andgee.AccelerationStreamAnalyzer(172): Compare gesture with 0 other gestures.
10-31 15:18:16.241: INFO/Andgee.AccelerationStreamAnalyzer(172): Recognizing gesture...
10-31 15:18:16.241: INFO/AndgeeTest(172): StateReceived Unknown 0
10-31 15:18:16.251: INFO/Andgee.AccelerationStreamAnalyzer(172): ######
10-31 15:18:16.251: INFO/Andgee.AccelerationStreamAnalyzer(172): No gesture recognized.
10-31 15:18:16.251: INFO/Andgee.AccelerationStreamAnalyzer(172): ######
----

I do worry a bit about "Compare gesture with 0 other gestures."
It says that all the time. Is it for my bad training or could there be a programatical problem behind it? Maybe I am unsing the wrong sensors for training.
janosch
Freshman
Freshman
 
Posts: 3
Joined: Fri Oct 31, 2008 4:08 pm

Top

Postby MrSnowflake » Fri Oct 31, 2008 6:20 pm

It somewhat works now, but the lib doesn't support loading and saving of gestures. I mailed the original developer and he said a newer version will support saving and loading, so I stopped developing this version. The recognition isn't 100%, but it was a start... :).
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby janosch » Fri Oct 31, 2008 7:00 pm

thanks for pointing that out!
I am working on multimodal application developement on android,
that's why this lib is very interesting for me.

MrSnowflake wrote:It somewhat works now, but the lib doesn't support loading and saving of gestures.


Do you mean that it runs but can't yet recognize gestures? Or is there a predefined set of gestures that i could use for testing?

MrSnowflake wrote:The recognition isn't 100%, but it was a start... :).


It's a good start, I hope to see more of that!
janosch
Freshman
Freshman
 
Posts: 3
Joined: Fri Oct 31, 2008 4:08 pm

Postby MrSnowflake » Sat Nov 01, 2008 10:02 am

janosch wrote:
MrSnowflake wrote:It somewhat works now, but the lib doesn't support loading and saving of gestures.


Do you mean that it runs but can't yet recognize gestures? Or is there a predefined set of gestures that i could use for testing?
I does recognize gestures, but not very acurately, but you have to train 1 gesture at least 10 times. But as I said, for the moment it's not usable, because gestures can't be saved.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Using Andgee w/o keeping button pressed

Postby gautamsarora » Tue Nov 18, 2008 2:15 am

Great work with andgee by mrsnowflake! [i'd seen wiigee sometime back and wanted to use for an android project too]

The issue I faced while using Andgee with the emulator was that the buttons needed to be kept pressed while doing the training and recognition.
I saw a post above where the sensor simulator can be run on a different machine to do the gestures (which is a neat idea!) but I wanted to programatically change this behavior so instead of keeping the buttons pressed, i can click the button once to start the training and click again to stop training (and same for recognition).

I've made some code changes in AndgeeTest and tested my changes by training and recognizing gestures, and it works well. I could share the code for this if anyone wants to use it as well.

My next step is to allow this to be done through the options menu instead without pressing keys but the problem is that andgee expects key events and the menu selections do not generate any events. Is there a simple way to generate key events in the activity itself or would this require changes in the andgee core?

Thanks,
Gautam
gautamsarora
Freshman
Freshman
 
Posts: 4
Joined: Thu Oct 16, 2008 3:13 pm

Postby MrSnowflake » Tue Nov 18, 2008 11:08 am

The main problem is that WiiGee can't save and load gestures. AndGee is now just a proof of concept. When WiiGee supports loading and saving, I will imediately begin porting it to Android and then such functions as button less recognition will be implemented.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Data points for training gestures

Postby gautamsarora » Sun Nov 23, 2008 1:17 am

I've been playing with Andgee to train some gestures.
Everytime I train a gesture that has tilt-like action, I see output on the logcat saying: Data: 4 etc.
Basically, that it saved many data points.

But when I do a gesture like a movement (say moving the phone up and down), all i get is Data: 1

I've tried this multiple times, and tilt-based gestures get trained and recognized but the movement gestures do not.

Any tips on what could be going wrong?

Gautam
gautamsarora
Freshman
Freshman
 
Posts: 4
Joined: Thu Oct 16, 2008 3:13 pm

Top

Return to Promote your Android Application

Who is online

Users browsing this forum: No registered users and 4 guests