Re: unit of measure in 2D Frequency Domain
- From: davem@xxxxxxxxx (Dave Martindale)
- Date: Wed, 21 Sep 2005 21:01:46 +0000 (UTC)
nronaldvdberg@xxxxxxxxx writes:
>For example, a 2D FFT on a 256x256 pixels image gives a 256x256
>frequency domain matrix. I know that the x-axis is horizontal spatial
>frequency and y-axis is vertical spatial frequency (right?). But:
>a. what is the unit of measure ('pixels per cycle'?)
You can think of it as "cycles per image width/height". Or you can
divide by the image size to get cycles per pixel.
For example, the coefficient at location [32, 64] in the transform array
represents a horizontal frequency of 32 cycles per image width, or
32/256 = 1/8 cycle per pixel (which can be expressed as 8 cycles/pixel).
The vertical frequency is 64 cycles per image height, or 64/256 = 1/4
cycles per pixel.
>b. what is the range (-127...0,0...127 on both axes?) (*)
Conventionally, the frequency range is [-127..128] cycles/width. If you
use a FFT that shifts the DC (zero frequency) term to the middle of the
array for convenient display or addressing, this is exactly the sequence
of frequencies represented by each column (or row).
On the other hand, it's probably more common to use a FFT that puts the
coefficients in the array with the DC term at [0,0]. Then the sequence
of frequencies represented by the columns/rows is
0 1 2 3 ... 126 127 128 -127 -126 -125 ... -3 -2 -1.
Which one you get depends on the FFT implementation you use.
>c. do we have multiple origins? If not, what is the origin after
> fftshift?
"FFTshift" sounds like a routine in a specific implementation. To find out,
read the documentation.
Please realize that there are many ways of defining the FT/IFT pair, and
then many ways you can implement one particular definition. If you're
writing your own implementation, you can choose your own conventions.
If your's using someone else's FFT implementation, you'll have to read
the documentation to understand what conventions they chose.
Dave
.
- Follow-Ups:
- Re: unit of measure in 2D Frequency Domain
- From: nronaldvdberg
- Re: unit of measure in 2D Frequency Domain
- References:
- unit of measure in 2D Frequency Domain
- From: nronaldvdberg
- unit of measure in 2D Frequency Domain
- Prev by Date: unit of measure in 2D Frequency Domain
- Next by Date: Re: unit of measure in 2D Frequency Domain
- Previous by thread: unit of measure in 2D Frequency Domain
- Next by thread: Re: unit of measure in 2D Frequency Domain
- Index(es):
Relevant Pages
|
|