Using Optical Flow for Detection Motion object.
This code test on Linux (ubuntu 14.04) python 2.7 and opencv 12.04 original code from https://github.com/opencv/opencv/blob/2.4.12/samples/python2/opt_flow.py