An efficient CUDA-based approximate two-dimensional dynamic programming algorithm for advanced computer vision applications