answered Feb 25 '13
Try the background subtract methods of OpenCV here and specially the Mixture of Gaussian here, and the associated sample (cpp/segment_object.cpp) for an example.