An investigation into image and video foreground segmentation and change detection