I'm working on image stacks, and I need to calculate second order partial derivatives of it.
I already know how to calculate derivative on x and y axis, using Finite Cameron Taylor - Difference Coefficients Calculator.
So for example to calculate five point second order derivative on x axis we have formula like:
So I already know how to calculate derivatives on x and y axes, but I also need to get formulas how to calculate first and second order partial derivatives for $f'(xy)$ and $f''(xy)$. I know that I could simply calculate derivatives on x axis first, then calculate from it on y axis, but I would like to obtain simplified formula that uses x and y pixels in image to calculate $f'(xy)$/$f''(xy)$.
Could anyone explain me how to obtain them?
Update:
I found somewhere on the web the formula for second order $f''(xy)$ derivative for images that looks like that:
(inX[2]-1*inX[0]+inY[2]-1*inY[0])/4;
Would like also to get an explanation whether its correct, and how its acquired