Getting gradient vector from sobel filter.