Foreground Segmentation in Video Sequences with a Dynamic Background