Computes the image's first derivative along the x and y axises using the Sobel operator.
The Sobel kernel weights the inner most pixels more than ones farther away. This tends to produce better results,
but not as good as a gaussian kernel with larger kernel. However, it can be optimized so that it is much faster than a Gaussian.
For integer images, the derivatives in the x and y direction are computed by convolving the following kernels:
y-axis
-0.25
-0.5
-0.25
0
0
0
0.25
0.5
0.25
</table}
x-axis
-1
0
1
-2
0
2
-1
0
1
</table}
Floating point images use a kernel which is similar to the ones above, but divided by 4.0.
As a side note, the sobel operator is equivalent to convolving the image with the following 1D
kernels: conv2( [0.25 0.5 0.25], [-1 0 1] )