im developing a game like Eye Toy of PSX 2, Eye Toy is a game that uses a USB camera for PSX 2 and you interact with the game, you are the player, with the avi capture code ported by James, the program gets all objects that dont exist on a previous captured image of the background without the player, and gets some pixels where the movement is detected, in the window the objects that dont exist on background are drawed on red color, and motion detection on green color, exists two options, Chroma range that is the range of color to eat the background, and noise detection eliminate some pixels noise, change this values to get a similar images that the screenshot. With F1, F2, F3 you can
enable or disable the previews of motion detection image, objects detection, and background chroma image, this are only usefull when you must configure the chroma and the noise. If you move the camera when you are playing press f12 to get a new background image, but you must not appear on the image. The game dont use the motion detection, only the objects detection, but the motion detection will be usefull for future games to detect if you attack or if you are touched by an enemy.
Download here: http://www.balrogsoftware.com/kosas/icamgame.zip
and a screenshot for users that dont have a webcam:

The source isnt available, i must optimize the code a little more...
Bye, and enjoy.