try to understand and realize the algorithm in the paper 'Motion-Aware Gradient Domain Video Composition'