Why can you do Convolution in frequency Domain?

AI Thread Summary
Convolution can be performed in the frequency domain by utilizing the convolution theorem, which states that convolution in the spatial domain is equivalent to multiplication in the frequency domain. While pixel position is not directly accessible in the frequency domain, it is encoded in the phase data. To apply a convolution kernel in the frequency domain, both the image and the kernel must be transformed using the Fourier transform, and then they can be multiplied together. However, discrepancies can arise due to aliasing effects if the sizes of the entities differ. Zero padding is recommended to avoid aliasing and ensure accurate results. The confusion often stems from the interpretation of convolution in the frequency domain and the need to account for the effects of size and aliasing when performing these operations.
Agadoul
Messages
2
Reaction score
0
Hi everybody,

I have question: Why can you do Convolution filter in the frequency Domain ?

I mean, when you apply a filter to an image in the spatial domain, it 's easy. You've got for example your sobel 3x3 kernel that you apply on every pixel of your image. Easy.

But when you convert your image to the frequency domain using a fast Fourier transform, there is no notion of pixel position and there is no way you're going to be able to do a convolution on the image using the pixel that were around the pixel?

am I right ?

if not, can someone try to explain why?

Thanks,

Axel.
 
Computer science news on Phys.org
I'm not sure I understand the question entirely? But my understanding is that performing a convolution in the frequency domain is an equivalent operation to performing a vector multiplication in the time domain. So you can do it, but it doesn't have the same effect.

While it's true that pixel position is inaccessible in the frequency information, that information isn't gone, it's just hidden. Positional information gets encoded into for example the phase data.
 
I think you understood me well. Ok so the position is still there but he is not implicitly showed (the size of a Fourier transformation is the same of an image : that has to have a meaning too).
If you want to apply a convolution kernel in the frequency domain, how do you do that ?
convert both the image and the kernel in the Fourier image and multiply them together. the size of both entities are different. how do you do that ?

thanks,

Axel.
 
What is the rule for the convolution operation ?

If you know the formula than I don't think there should be a problem using that rule even in the frequency domain. But the problem is what is the interpretation for taking convolution in frequency domain. What do you want to filter?
 
Hello There,

I am doing my PhD in Image debluring and the convolution problem sometimes getting me crazy ..
If we take a simple example of convolution between 2 vectors A & B such that
A = [1 2] and B = [3 4]
and i want to perform the convolution in both time and frequency domain!
using MATLAB
>> A = [1 2]

A =

1 2

>> B = [3 4]

B =

3 4

>> C = conv(A,B)

C =

3 10 8

>> D = ifft(fft(A).*fft(B))

D =

11 10
But according to the convolution theorem A*B in the spatial domain is equivalen to A.B in the frequency domain but still we are not getting the same answer ,, Can Anyone explain me why please ! Thanks a lot ..
 
That is the same. You just forgot to alias the 8 back in on top of the 3. If you want to avoid aliasing then you need to do zero padding.
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Back
Top