Re: unit of measure in 2D Frequency Domain



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
.



Relevant Pages

  • Re: doubts about rc4
    ... >for rc4. ... the number of cycles are varying as function ... >realized the array has to be filled with the key size and, in turn, ... Greg Rose ...
    (sci.crypt)
  • Re: ICFP Contest
    ... Wow, I lost faith after an hour and some 10,000,000 um cycles! ... I thought somebody said it took 1 Gcycles to get to LOADING, ... It only took about 15 minutes to decompress the codex using gforth-fast ... no work when it is asked to replace the current array with the ...
    (comp.lang.forth)
  • Re: How Math.Cos & Math.Sin is implemented?
    ... |> | cycles, but I still prefer to pre-compute needed sin/cos value in two ... Accessing an array is always supposed to be faster than ... These are not hidden and are fixed costs, hidden costs are ... things like L1/L2 data cache misses, ...
    (microsoft.public.dotnet.languages.csharp)
  • doubts about rc4
    ... for rc4. ... the number of cycles are varying as function ... cycles varying with message size? ... realized the array has to be filled with the key size and, in turn, ...
    (sci.crypt)
  • Re: Copy a file to multiple servers with the same location on each
    ... Because the ARRAY example I provided cycles through the machine names you ... will have to put into the script in place of the names I used (computer1, ... The ARRAY reads each machine name, executes the portion of the script you ...
    (microsoft.public.scripting.vbscript)