MATLAB implementation of the Sobel filter for edge detection.