4
$\begingroup$

This equation can be shown mathematically:

$\frac{\partial f}{\partial x}=\frac{2\pi i}{N} \mathcal F^{-1}\left(u\cdot \mathcal F(f(x,y)\right)$

I am struggling to understand the intuition behind it when talking about 2D fourier for images and the use of derivatives to detect edges.

How does multiplying the Fourier transform of the image with $u$ help us detect edges in the x direction? Why does it make the "edges" white and the rest of the image darker?

Any help would be appreciated. Thank you!

$\endgroup$
  • $\begingroup$ What is u specifically? $\endgroup$ – Dan Boschen Dec 14 '19 at 19:53
  • $\begingroup$ u is the x axis of the fourier transform (-L/2 to L/2) $\endgroup$ – PhysicsPrincess Dec 14 '19 at 20:47
  • 1
    $\begingroup$ But do note that this is usually not a good way to compute the derivative because it enhances noise a lot. Adding a (Gaussian) regularization (smoothing) is highly recommended. $\endgroup$ – Cris Luengo Dec 16 '19 at 1:48
4
$\begingroup$

In general, the time derivative property of the Fourier Transform is given as

$$\mathscr{F}[\frac{d}{dt}x(t)] = j\omega X(j\omega) $$

Notice that we can simply multiply by the frequency index in the Fourier Transform result.

For the 2D FT result:

$$\mathscr{F}[f(x,y)]= F(u,v)$$

Using the same property results in:

$$\mathscr{F}[\frac{d}{dx}f(x,y)]= uF(u,v)$$

$$\mathscr{F}[\frac{d}{dy}f(x,y)]= vF(u,v)$$

The reason this detects edges is clear if you observe how the differentiation of a 1D step function results in an impulse. Your edges approximate steps. The derivative is the slope, so where the slope is high (edges) the derivative is large.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Sorry, I don't get what you mean in the last part. Why do edges contain high frequencies? $\endgroup$ – PhysicsPrincess Dec 14 '19 at 21:52
  • 1
    $\begingroup$ The fast you change in time the higher will be the frequency - although that statement is probably more confusing--- I can say it another way so will update that. $\endgroup$ – Dan Boschen Dec 14 '19 at 21:58
  • 1
    $\begingroup$ @PhysicsPrincess Roughly speaking, a sudden change (very short in duration) in the state of something such hitting a tensioned string with a hammer would induce oscillations of very high frequencies, whereas slowly shaking one end of an attached rope would induce a wave of very low frequency, as the event happens slowly. Now by definition edges happen suddenly in an image. Hence in the frequency domain they require high frequency components (oscillations). $\endgroup$ – Fat32 Dec 14 '19 at 22:26
  • $\begingroup$ Well said- I had trouble explaining the presence of high frequencies so simply—- (further complicated by the fact that a step is the integral of an impulse and an integral is a low pass function) $\endgroup$ – Dan Boschen Dec 14 '19 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.