I want to compute gradient of a grayscale image, first derivative as well as second derivative.
I used Sobel operator (in the form of matrix) but the problem is that I am getting second derivatives (both with respect to x and y) as zero everywhere.
Can you suggest me some other operator that could help me for this purpose.