GFourier works only on grayscaled images with no alpha channel
Back to top
When I began to think of this plug-in, I wanted to write a plug-in that calculated the Fourier Transform of an image and gave it back to Gimp. Then I could use some plug-ins to manipulate data. There would be an Inverse Fourier Transform to go back to 'real world'. However, there is a big problem in this: Gimp should be modified.

The bitmap you see in the GFourier main window is just a representation of the data resulting from the Fourier Transform. You are seeing integer values, corresponding to the module of the complex data (two float values) underneath; however, GFourier must work internally with the complex data. If I passed only the representation to Gimp, I would lose all the complex data, and I would never be able to do the Inverse Fourier Transform.

One possible solution was adding a new image type to Gimp, which could hold both the grayscaled bitmap and the complex data; new 'fourier-specific' plug-ins could modify data and update the representation later. This new type of image would be incompatible with all the previous filters already made; I even think that a big part of Gimp could need to be rewritten to be 'fourier-aware'.  I wrote to the Gimp authors asking about this possibility (maybe this was a mistake and I should have written to the mailing lists, but I do not remember if there was any mailing list when I began to think about all this), but I got no answer; anyhow, all that seemed just to much work for a plug-in, and I decided to do all the work inside the plug-in.

Back to top
The image created by 'Windows/New preview' is only a bitmap showing the data, a 'photograph' of the complex values. From the point of view of GFourier, this image is just like any other image, not a complex matrix. Most of the information obtained by the Fourier Transform is not present in that bitmap, and it cannot be recovered.
 
 Back to top
Internally, GFourier works with floating point data (complex numbers); that data is converted into integer values when you press the Ok or the Preview buttons, because that is the type of data GIMP uses. Algorithms inside GFourier can normalize or equalize the floating point data before doing the conversion. This method is much more precise than the integer one used by GIMP; images which have been normalized or equalized by GFourier will always use the whole range or colours.

Some filters may produce a plain image (which cannot be enhanced by GIMP) if normalization is not used.

Back to top
Take an image and open GFourier on it. Now select 'Windows/New Preview' and we will have an image we can work on. On this new image, open the 'Layers & Channels' window, add a new white layer and change its mode to 'darken only'. You can paint on that layer anything you want to hide the noise. When the FT looks nice, delete the background layer, flatten the image and invert it. You have just created the perfect mask for your purposes.

If you can obtain a Fourier Transform of the noise that your image contains, use its representation directly as a mask.

Back to top

Prev Index Next