Sobel Filter optimisations.