2D image Fourier Transform Filter: Even & Odd.

Click For Summary

Homework Help Overview

The discussion revolves around the application of an Ideal LowPass Filter to a square 2D image using the Discrete Fourier Transform. The original poster expresses confusion regarding the implications of using even-number-sized images and filters in this context, particularly concerning the identification of the center point in the Fourier Transform.

Discussion Character

  • Exploratory, Assumption checking, Conceptual clarification

Approaches and Questions Raised

  • The original poster attempts to clarify the requirements for filters in relation to the size of the image and questions the implications of using even-number-sized filters. Some participants suggest alternative methods, such as modifying the image size, while others explore the differences between spatial and frequency domain filtering.

Discussion Status

Participants are actively engaging with the original poster's concerns, with some offering suggestions while others seek further clarification on the concepts involved. There appears to be a productive exploration of the topic, though no consensus has been reached regarding the best approach to the problem.

Contextual Notes

The original poster notes a preference to avoid introducing artifacts into the image through modifications, indicating a concern for maintaining image integrity. There is also mention of specific functions in MATLAB related to the Fourier Transform that may influence the discussion.

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.
 

Similar threads

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