Naive Sobel operator implementation.