Webcam motion track

Did someone know how to setup a motion track webcam? I am working with an reponsive architecture idea, that a kinetic ceiling could response to passerbys. :D

Have a look for the ball balance machine using processing. That use a webcam to track a ball on a flat piece of wood and then used an arduino to move the servos to keep the ball in the middle of the wood (or whatever motion was wanted).

This a much more processing software type problem.

Mowcius