I'm applying a Gaussian blur to an image where each pixel of the original image is being optimized for some purpose and the Gaussian blur is an intermediate transformation on the pixel intensities. It is important for me to be able to get the Jacobian, analytically or numerically, of this transformation.
For instance if the transformation of the pixels can be given as F(p) then I need to be able to find dF/dp.
As you may know, a function to which the Gaussian Kernel is applied to is transformed as such:
$ H(i,j)=\sum_{u=-k}^k\sum_{\upsilon=-k}^k\frac1{2\pi\sigma^2}\mathrm{exp}\left(-\frac{u^2+\upsilon^2}{2\sigma^2}\right)F(i-u,j-\nu).$
It is relatively easy to find X and Y derivatives for this function, but it is not what I want.
What I want is a function that takes as its input an image. and outputs a Jacobian matrix describing the gradient of each output pixel with respect to each input pixel
I'm stumped about how to actually find this though. It doesn't have to be analytical, it can be numerical through a Python program. Numerically I could utilize finite difference, but is there a better way?
I don't really even know where to start.