views:

148

answers:

2

Hi, I'm researching a potential project involving flash based augmented reality, and I've already looked at FlarToolkit and FlarManager which seem pretty straight forward to execute marker detection.

What I cannot find are any sites or assistance with how to detect hand position, etc. To allow the subject to 'press' buttons. An example of what I mean can be found here: http://www.youtube.com/watch?v=rn_iPjGKd0M&feature=player_embedded where the model presses virtual buttons to take action.

Any help is appreciated - thanks,

b

+1  A: 

it's not too hard to create the illusion of pressing button by moving you hand over certain areas of the screen like in the video you linked. If you actually wanted to detect gestures that's far beyond my range of experience.

You can create the effect by drawing an area of the webcam field to a bitmapdata class and then compare it to the previous frame and draw a new bitmap using a difference filter and then detect changes in pixel values. I used this method to create this game: http://www.youtube.com/watch?v=PVhFSwo1F6E

That should be enough info to google around and find some source code

Oliver
Impressive work - I've been unsuccessful in finding more direction on how to accomplish this. In theory it makes sense, if the pixels have changed then something is 'over' the hit area - is there anything you could point me to for more concrete directions / help?I don't believe using bitmap comparison and going pixel by pixel would be feasible or accurate enough due to lighting, some pixels certainly would have changed.Thanks for any futher assistance - b
WillyCornbread
Sorry for the multiple comments, but I wanted to check if this seems like a reasonable way to accomplish, and if performance would be acceptable in a scenario like I posted above.If I draw a bitmap each frame of the 'button' bounding box. Then use BitmapData.compare to create a difference bitmap. Then use .threshold to find the number of pixels that are <> 0x000000 - I could then compare this number to the pixels in the original to get an idea of how different they are?Thanks for pointing me in the right direction if this is feasible.b
WillyCornbread
Disregard - for anyone's reference there is an excellent primer here: http://www.adobe.com/devnet/flash/articles/webcam_motion.html
WillyCornbread
A: 

It's very interesting. Can you share your source code of your comparing algoritm?