Often an image g(x, y) is regularized and even restored by minimizing the Mumford-Shah functional. Properties of the regularized image u(x, y) depends critically on the numerical value of the two parameters α and β controlling smoothness and fidelity. When α and β are constant over the image, small details are lost when an extensive filtering is used in order to remove noise. In this paper, it is shown how the two parameters α and β can be made self-adaptive. In fact, α and β are not constant but automatically adapt to the local scale and contrast of features in the image. In this way, edges at all scales are detected and boundaries are well-localized and preserved. In order to preserve trihedral junctions α and β become locally small and the regularized image u(x, y) maintains sharp and well-defined trihedral junctions. Images regularized by the proposed procedure are well-suited for further processing, such as image segmentation and object recognition.