Partial implementation of sobel filter.