Re: fft phase for object detection



"Graham Jones" <x@xxx> writes:

Are you trying to say modulus and argument (or phase) when you say re and
im? Anyway that's the only way I can make sense of your question. I suggest
you try FFT-ing an image, dividing each value by its modulus (thus removing
the information contained in the modulus, leaving just phase information)
then inverse FTT-ing the result and looking at it. If the original image was
simple, it will probably still be recognisable.

Another interesting experiment: take two images the same size, call them
A and B. FFT each of them independently, and convert the output to polar
form (magnitude/phase angle). Now create a new complex array of the
same size as the FT of the first two, and fill each location with the
amplitude (modulus) from the corresponding location in A's FT and the
phase from the corresponding location in B's FT. (Essentially, you're
building a new composite FT whose amplitude information comes from one
source and whose phase comes from the other). Convert all the
coefficients from polar back to Cartesian form, and then do an IFFT.

The result, call it image C, will have features from both A and B mixed
together. But I'll bet it looks more like B than A. If that's true for
the set of images you try it with, you can say that the phase actually
carried *more* of the human-visible information in the image than the
amplitude did.

Dave
.



Relevant Pages

  • Re: help solving addition problem in C
    ... take a temporary variable to store sum and initialize it to zero, ... Now by recursively taking modulus and dividing the number you can each ...
    (comp.lang.c)
  • Re: Getting the units of a number
    ... > I was looking at dividing the number by ten and using the modulus ... The loop could do without the modulus operator: ... Peter van Merkerk ...
    (comp.lang.cpp)
  • Re: Getting the units of a number
    ... "Adrian Gibbons" wrote in message ... > I was looking at dividing the number by ten and using the modulus ... Or did you mean the number of digits in the integer? ...
    (comp.lang.cpp)
  • Getting the units of a number
    ... I was looking at dividing the number by ten and using the modulus ... Regards, ... Adrian. ...
    (comp.lang.cpp)