A robust motion estimation and segmentation approach to represent moving images with layers