How to using Box2D to interact with the webcam

Recently, i am thinking of doing a game that using Box2D to interact with the webcam, which means a body show on the webcam can bounce the ball inside the flash.

Acutally, i am new to Box2D, I am researhing if i can make the game with Box2D. So far i can only find out that i can only create the object using b2PolygonDef and b2CircleDef to create object in the world. But can i create a define object like using BitmapData? Is it possible to make it? And where can i create a define object

Thanks so much!!
what you could do is plot out points on the object on the webcam, and then draw polygon shapes using these points. would be a lot of work, but it should be possible
well now i'm curious about this idea.

the only question is how could you go about plotting out points on the object of the webcam?
[email hidden] wrote:
well now i'm curious about this idea.

the only question is how could you go about plotting out points on the object of the webcam?


thats going to be the difficult part. If you know your way around bitmap data then it would probably come down to analysing colours and movements, and trying to differentiate a hand from a background. Best thing to somehow capture the colour of the person's hand and try to capture its movement. This alone would be one hell of a project. After that you need to find some way of drawing points on the hand, and then actually finding the way to move the points along with the hand, because you cant simply re-draw all the points after movement. I'm not 100% sure flash could handle such a load of processing, and it will be about 1 year's project if your committed to it, and have a direction.

Original thread: https://box2d.org/forum/viewtopic.php?t=4763