2D FFT Scaling ippiFFTInv_PackToR_32s8u_C3RSfs

2D FFT Scaling ippiFFTInv_PackToR_32s8u_C3RSfs

I'm trying to use function ippiFFTFwd_RToPack_8u32s_C3RSfs. The input is 512x512 RGB image. When I perfom forward and then inverse FFT, the image is either very dark or completly white, depending on the normalization I use.
For example, if I use any normalization other than IPP_FFT_NODIV_BY_ANY, resulting image will be very dark. If I use IPP_FFT_NODIV_BY_ANY, then I must specify 17 as a scale factor in the inverse FFT, otherwise the image is completly white.
Documentation is very vague about this (and many other) issues. I would assume that I don't need a scale factor (scale factor=1) to do froward and then inverse FFT to get the original image. Is this due to integer nature of this specific fft? Cananyone shed some light on this?

Thanks,
Miro

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Miro,

reqarding our expert, some small difference is allowable when you specify IPP_FFT_DIV_BY_SQRTNor IPP_FFT_DIV_INV_BY_N flags in call of ippiFFTFwd_RToPack_8u32s_C3RSfs / ippiFFTInv_PackToR_32s8u_C3RSfs functions.

When you use IPP_FFT_NODIV_BY_ANY flag for images 512x512 you need to calculate scaleFactor as scaleFactor=18. Because of9+9 (512=2^9), in this case you also should get close results.
If you still have big differences please check if you call IPPfunctions with correct parameters.

Regards,
Vladimir

Vladimir,

thank you very much. I didn't realize that scaling factor is actually a power of two. Documentation doesn't mention that (did I miss it?)

Thanks,
Miro

Leave a Comment

Please sign in to add a comment. Not a member? Join today