Page 1 of 1

Stuck with forwardFourierTransform in Magick++

Posted: 2010-08-21T07:03:52-07:00
by blackhaz
Hello All,

I am stuck understanding how forwardFourierTransform operates with images:

Image tmpI
...
tmpI.forwardFourierTransform(true); /* true returns magnitude/phase pair, otherwise real/imaginary pair */

Results in a single magnitude image saved to tmpI. Please, help to understand how to get the phase image?

Thank you and I am sorry if this question is lame. I have tried Googling but have not found at least a single example of forwardFourierTransform usage.

Max

Re: Stuck with forwardFourierTransform in Magick++

Posted: 2010-08-21T09:26:06-07:00
by fmw42
I don't know how it works in any IM API, but in command line, you will either get two images as a result (from one filename) or one image with two frames depending upon the file format you used.

If you are not in HDRI mode, you need to probably be in Q16 compile IM and must use the magnitude/phase pair. In command line this is -fft (rather than +fft which produces real/imaginary components). Likewise the inverse transform will be -ift (rather than +ift).

Sorry I cannot help further about its use in any API.

I would suggest you work out your processing in command line mode first, to get an understanding, then try to find out how to do the same in your API

Re: Stuck with forwardFourierTransform in Magick++

Posted: 2010-08-22T14:52:29-07:00
by fmw42
Magick,

Is the post above related or the same issue as the post at viewtopic.php?f=3&t=16896

Re: Stuck with forwardFourierTransform in Magick++

Posted: 2010-08-22T15:11:48-07:00
by el_supremo
It does seem to be the same issue.

Pete