Text this: Contour Detection and Completion for Inpainting and Segmentation Based on Topological Gradient and Fast Marching Algorithms