11
$\begingroup$

Can we take advantage of the fact that high frequency components in the FFT of an image generally correspond to edges, to implement an edge detection algorithm in the fourier domain? I did try multiplying a high pass filter with the FFT of an image. Although the resultant image sort of corresponded to edges, it wasn't exactly the edge detection established using convolution matrices. So is there any way you could do edge detection in the fourier domain, or it's not possible at all?

$\endgroup$
6
$\begingroup$

Since convolution in spatial domain is multiplication in the Fourier (frequency) domain, you can perform edge detection in Fourier domain by multiplying the spectra of image and the edge detection kernel and then perform IFFT on the result.

I think the high-pass filter alone is not appropriate for edge detection since it keeps all high-frequency features (e.g. sharp peaks and corners) which are usually not classified as edges.

More advanced edge detection methods would be tricky in frequency domain since edges are best described in spatial domain (in my opinion).

The question is why to do edge detection using FFT in the first place? Is it because performance considerations? If so, maybe the high-pass filtered image (produced quickly by FFT) can be quickly filtered again to remove non-edge parts.

$\endgroup$
  • $\begingroup$ Yeah the thought was because of performance considerations, since Matlab takes awfully long to iterate over each pixel of the image. Will try out padding the convolution filter and taking its FFT and filtering the image. Thanks! $\endgroup$ – rounak Jul 9 '12 at 7:29
  • $\begingroup$ Edges are based described in some flavour of wavelet domain (in my opinion) ;) $\endgroup$ – Henry Gomersall Jul 9 '12 at 16:06
  • 1
    $\begingroup$ this depends all on your definition of an edge: if you zoom into it, it would "shift" in the frequency domain to lower frequencies. Thus, an edge it is not sufficient to define it as a high frequency feature. $\endgroup$ – meduz Jul 12 '12 at 20:39
5
$\begingroup$

Usually the edge detection is done by a convolution of a 2-D filter/kernel like Roberts Cross or a Sobel formulation. Since those are convolutions, LTI rules apply, like being able to equivalently apply them in the frequency domain. That is, take both the kernel and the image into the frequency domain via DFT, multiply them together, and then IDFT the result back into the spatial domain.

I should also add that the kernels in the spatial domain, do in fact try to exploit the high spatial frequency characteristics of the edges. For example, if you look at Roberts, you can see how it is doing a differentiation across the diagonal points - ie, a high pass filtering operation.

$\endgroup$
1
$\begingroup$

Both a single step and a single sawtooth produce a nice linear relationship between frequency and phase in the frequency domain, with the slope of the unwrapped phase depending on the location of the edge in the FFT window. For detecting or estimating the location of an assumed single edge, you could try to unwrap phase in the frequency domain and see if the result has sufficient linear correlation to pass some detection threshold.

$\endgroup$

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.