Calculating the first derivative of an image using DFT
They are not the same. Using 1D notation,

the discrete-time (backward) first difference is $x[n] - x[n-1]$ whose frequency domain DTFT equivalent is

$$ x[n]-x[n-1] \leftrightarrow X(e^{j\omega}) - e^{-j \omega} X(e^{j\omega}) =X(e^{j\omega})(1- e^{-j \omega})  $$

which becomes
$$ x[n]-x[n-1] \longleftrightarrow X[k](1 - e^{-j \frac{2 \pi}{N} k})$$ using the DFT to implement it.

The FIR impulse response of the discrete-time system that implements the first difference is therefore,

$$ h[n] = \delta[n] - \delta[n-1]$$

The first derivative of a continuous-variable function $x(t)$ is $x'(
t)$ and in CTFT domain it becomes :
$$ x'(t) \longleftrightarrow j\Omega X(\Omega) $$

where the analog system frequency response is

$$H_d(\Omega) = j \Omega $$

which is not implementable in digital form, but a bandlimited approximation to it is attained under a sampling period of $T$ that yields an equivalent discrete-time frequency response of a (bandlimited) differentiator as

$$ H_d(e^{j \omega}) = j \frac{\omega}{T} ~~~, ~~~~ |\omega| &lt; \pi$$

The associated discrete-time (IIR) impulse response is
$$ h_d[n] = \text{IDTFT} \{ H_d(e^{j \omega}) \} = \text{IDTFT} \{ j \frac{\omega}{T}  \} $$

Practically you would truncate and window $h_d[n]$ before using.

So they are not the same.