Ask Your Question

Revision history [back]

DFT_ROWS flag

Hello,

I am trying to take the DFT of an image, multiply it with a filter, and then take it's inverse DFT. I have got the DFT-IDFT part working (That is, I take the DFT of an image, then take it's IDFT, and obtain the original image). The following code works:

// In is the Input Image.

dft(In,In,DFT_ROWS);

dft(In,In,DFT_ROWS|DFT_INVERSE);

However, when I introduce the filter, I get garbage images:

dft(In,In,DFT_ROWS);

multiply(In,filter,In);

dft(In,In,DFT_ROWS|DFT_INVERSE);

However, when I use the DFT_REAL_OUTPUT flag instead of the DFT_ROWS flag in the above code(nothing else is changed), the output images are correct. I am using DFT_ROWS, as it is almost 50% faster. Can anyone give me some insight into this problem?

Best Regards,