Hi, you may find interesting this tutorial by Max Neupert:
http://web.uni-weimar.de/medien/wiki/Bewegungsmelder
then there are few useful patches in: pd browser (cntrl+b) > examples > GEM > 04.video > 03.movement-detection.pd pd browser > manuals > 2.Image > 17.tracking.pd
this is just to start. You may also want to check GridFlow, Pdp + opencv... cheers
M
Hellow.