Consider an image (img) as

enter image description here

A nice explanation of the Fourier transform of an image can be found here. However, I want to perform the Fourier transform locally. For example,

{w,h} = ImageDimensions[img];
imgparts = ImagePartition[img,{w/8,h/8}];

This will give me 64 image parts and I can apply Fourier transform on each image part and assemble them. However, this is computationally very expensive.

Is there any better and faster way (maybe applying the Fourier transform only once) to do it?

  • $\begingroup$ Is what you're trying to do not just some variation of wavelet analysis? reference.wolfram.com/language/guide/Wavelets.html $\endgroup$ – Sjoerd Smit Apr 12 '18 at 15:20
  • $\begingroup$ @SjoerdSmit In some sense. But I think, there are some fundamental differences. See this paper: ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=958567 $\endgroup$ – Majis Apr 12 '18 at 15:30
  • $\begingroup$ Well, your partitioning of the image is pretty much equivalent to multiplying the image with 64 different masks. Multiplying in real space = convolution in Fourier space, so what you could do is compute the FT of the image and then perform convolutions of this FT with the FTs of the masks (which should be very simple). $\endgroup$ – Sjoerd Smit Apr 12 '18 at 15:39
  • 1
    $\begingroup$ Furthermore: Map[ImagePeriodogram, imgparts, {2}] and dat = Map[Fourier@*ImageData, imgparts, {2}]; evaluates really fast for me on your example. How many transforms do you plan to do? I don't really see how this is operation is computationally prohibitive. $\endgroup$ – Sjoerd Smit Apr 12 '18 at 15:57
  • $\begingroup$ @SjoerdSmit Thanks. You are right. $\endgroup$ – Majis Apr 12 '18 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.