Sobel for many dimensions