Application of the topological gradient to image restoration and edge detection.