[OLPC-Games] Computer vision on the XO: what it is. what should it be?

Joshua Minor j at lux.vu
Wed Jul 23 20:39:20 EDT 2008


On Jul 22, 2008, at 7:43 PM, Nirav Patel wrote:
>
> 2.  Play pong with your hand:  Have the user step out of the field of
> view of the camera, save the image.  Now threshold between the saved
> image and the images currently being captured.  This results in just
> showing the differences between the two (like the user, who has now
> stepped back into the field of view).  Turn the image into a bitmask
> and check it for collisions with the bitmask of the ball in pong.
> Actually, now that I'm thinking about it, I'll probably write this
> game when I get home.


I wrote a pong game that does this.  You don't even need to step out  
of the frame first.  I just look at differences from one frame to the  
next.  This has the advantage that it continues to work when the  
camera is bumped (often the case when jumping around playing pong in  
front of a laptop) or when the lighting conditions change.  The only  
drawback is that the ball won't bounce off of you when you are  
absolutely still.  This rarely happens when actually playing.

http://lux.vu/blog/2006/07/30/video-pong/

-josh




More information about the Devel mailing list