Webcam motion track

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