Capturing the local structure of image discontinuities in two dimensions