2D image Fourier Transform Filter: Even & Odd.

Click For Summary
The discussion revolves around the challenges of applying an Ideal LowPass Filter to square 2D images of even and odd sizes using the Discrete Fourier Transform. It highlights that odd-number-sized filters have a clear center, while even-number-sized images complicate center identification, as the center point is not at the geometric center. Suggestions for addressing this issue include adding a line to make the image odd-sized, though this is seen as a hack that could introduce corruption. The conversation also clarifies that filtering in the frequency domain involves simple element-wise multiplication, regardless of image size. Ultimately, the focus is on the complexities of inverse Fourier Transform operations and the implications of center shifting for different image dimensions.
stabu
Messages
26
Reaction score
0
Hi,

Just when I thought I'd grasped the Discrete Fourier Transform properly,something comes along and messes me up ... and my books don't seem to treat it.

Say you have a square 2D image and you want to do an Ideal LowPass Filter. Well, in general, filters need to be odd-number-sized so that there is a clear center.

With a center shifted Fourier Transform, as long as the image has odd-numbered columns and rows, the center point is the DC component. That's fine if the image (and its Fourier Transform - always same number-size as image) are odd-number-sized. So you can apply a filter by multiplying each component of the image's FT.

But if the image is even-number-sized, what then? It implies you must multiply by an even-number-sized filter. In any case, your center is in fact N/2+1, when N is the dimension of your square image ... so your "center" is in fact, not in the center.

This has me in a fuddle. Sorry if I don't explain myself properly ... you'll need to have run into this problem yourself to fully gasp it.

Having said that, in general terms even-number-sized object do have center-identification problem ...

Thanks in advance for suggestions and advice ...
 
Physics news on Phys.org
I don't understand most of what you said, but why can't you just add a black or white vertical and horizontal line (as needed) to the very end of your image to make it odd pixel in length?
 
hi Mistermath,

yes, I was quite circumspect, sorry. However, your suggestion is to the point, so thanks for trying to understand.

It's doable, but it's a hack. It introduces corruption - however small, which I want to avoid. However, I'm not above trying it!

Many thanks! Any more suggestions welcome, though it appears I have to clarify (however, I suppose I was looking for people who have done mage processing before ...).

Cheers!
 
OK.. I seem to have made some progress ... on the question only.

It remains to be seen if on the answer also.. but it could be.

When I talked about filters needing to be odd-numbered (1x1,3x3,5x5,etc), well that's a spatial filter requirement. And spatial filtering is a different story.

Filtering in the frequency domain is easier as it just means multiplying each element of your matrix by your filter matrix. Even or oddsized images, the operation doesn't change: simple element by element multiplication.

What my question should have addressed is how the inverse FT- center-de-shifting (sorry if this is obscure - it's for image processors only) of the image occurs when even of odd. For even images, you simply apply fftshift again (matlab-speak). But for oddsized images, you cannot do this. Read matlab's help ref. iffshift function.

It really came out and bit me, this one. It's seems hard to explain. Apologies to quizzical readers.
 
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
8
Views
2K
Replies
8
Views
3K
Replies
1
Views
1K
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
1
Views
3K