Stuck with forwardFourierTransform in Magick++

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
blackhaz

Stuck with forwardFourierTransform in Magick++

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stuck with forwardFourierTransform in Magick++

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stuck with forwardFourierTransform in Magick++

Post by fmw42 »

Magick,

Is the post above related or the same issue as the post at viewtopic.php?f=3&t=16896
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Stuck with forwardFourierTransform in Magick++

Post by el_supremo »

It does seem to be the same issue.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply