MATLAB code to illustrate moving object detection by three-frame difference method.