im_grad_x(3)
generates an image where the value of each pixel is the difference between horizontally ajacent pixels in the input
image. The output has the same height as the input and one pixel less width.
im_grad_y(3)
generates an image where the value of each pixel is the difference between vertically ajacent pixels in the input
image. The output has the same width as the input and one pixel less height.
In both cases, the input can be any uncoded integer type, and the output is signed 32 bit integer.
RETURN VALUE
The functions returns 0 on success and -1 on error.