Robust foreground segmentation using improved Gaussian mixture model and optical flow