It can be shown that the image derivative in the $x$ direction is given by: $$ \frac{\partial f}{\partial x}=\frac{2\pi i}{N} \mathcal F^{-1}\left(u\cdot \mathcal F(f(x,y)\right) $$ where $N$ is the width of the image in the $x$ direction and $u$ denotes a variable in the fourier space ($F(u,v)$).
Now, in the image space, derivation is a convolution with this matrix: $$\partial_x =\left(\begin{array}{cc} -1 & 1\end{array}\right)$$
this means (from to convolution theorem) that the fourier transform of $\partial_x$ is a matrix $D(u,v)$ such that $D(u,v)=u$.
so I tried to see this in python, but something seems to be wrong here:
d = np.zeros((21,21))
d[10,10] = 1
d[10,9] = -1
D = np.fft.fft2(d)
plt.matshow(np.fft.fftshift(D))
Can anyonw see where I am wrong?
D
$\endgroup$