0
$\begingroup$

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?

$\endgroup$
5
  • $\begingroup$ Is what you're trying to do not just some variation of wavelet analysis? reference.wolfram.com/language/guide/Wavelets.html $\endgroup$ Commented Apr 12, 2018 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$
    – user36426
    Commented Apr 12, 2018 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$ Commented Apr 12, 2018 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$ Commented Apr 12, 2018 at 15:57
  • $\begingroup$ @SjoerdSmit Thanks. You are right. $\endgroup$
    – user36426
    Commented Apr 12, 2018 at 16:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.