Motion Segmentation Algorithm