Moire Remove Gimp
As someone who photographs a lot of corporate portraits, I’ve seen my fair share of business suits. And one of the most common things you’ll find in these suits is very fine patterns and woven textures—the kind of thing that’s perfectly suited to causing moiré. (These patterns can be found in all types of clothing, however, and other surfaces as well.) So I’m always on the lookout for a new and improved way to repair moiré—and I think I’ve found a good one.
Moiré is the pattern of interference that occurs when one fine pattern is overlaid on another—like when a fine check in a piece of clothing is rendered via a sensor tightly packed full of pixels. It produces what amounts to rippling highlights and shadows and even rainbow colors as the patterns don’t quite line up right, creating visual interference. In practice, it can be subtle and barely noticeable or it might be terribly distracting. In either case,9 it’s good to know how to get rid of it. I used to use a series of steps requiring multiple tools in Photoshop. Now I just turn to one single tool in Lightroom.
With the offending image selected in Lightroom, open the Develop module and zoom in close to fill the screen with the moiré pattern. At the top of the right-hand sidebar, just below the Histogram, you’ll see a selection of controls: the Crop Overlay, the Spot Removal tool, the Red Eye Correction tool, the Graduated Filter, the Radial Filter and the Adjustment Brush. It’s these last two—in particular the last one, the Adjustment Brush—that offer straightforward and simplified moiré removal.
Aug 25, 2019. The first 70 pages were things I'd already learned through the web or the help pages (e.g., installing GIMP, opening and saving different file types). My interest waned further when I noticed the first image editing example in the book discusses how to remove the moire pattern that results from scanning a photo in a newspaper.
Click on the Adjustment Brush and then down near the bottom of the list of sliders you’ll see one for Moiré. The more you drag the slider to the right, into positive values, the stronger the reduction of the pattern will be. Then, simply adjust the brush size (not far below the moiré slider in the panel) and be sure to use a feathered edge. You can reduce the flow, too, if you’d like a more subtle approach—but I don’t when I’m fighting moiré, so I leave it maxed at 100.
Next, simply click and drag to paint the fix onto the moiré pattern in your picture. You can make multiple passes, as well as readjusting the size and flow of the brush, as well as the intensity of the repair with the Moiré slider. After completing the repair, you can always re-click on the small gray circle that’s now visible on the image in Lightroom when you have the Adjustment Brush tool active in order to adjust a previous attempt at the moiré reduction, making it stronger or less intense.
I mentioned earlier that you can also use the Radial Filter to similar effect. It’s the same sort of application of the tool, but it can only be applied in round or oblong shapes rather than the freehand painting that can be done with the Adjustment Brush—which is why the Adjustment Brush should be your first stop for a straightforward Lightroom fix to even the nastiest moiré interference.
Gimp Descreen
Interference or other regular patterns overlaid on an image can be introduced by a variety of sources, including:
- Electromagnetic interference in the environment of the device collecting the image;
- Noise in a transmitted image such as a television still due to analogue transmission interference or degradation of media;
- The texture of the paper that the image was printed on, particularly if it was printed in a cheap magazine or newspaper.
Attempting to remove these by ordinary image space techniques such as replicating the pattern and subtracting it would be extremely difficult and unlikely to be completely successful. Sometimes interference can be hidden by downscaling or blurring, but this is rarely a satisfactory solution. Sometimes convolutions can be used, but this is an advanced technique.
Since regular patterns have a very small bandwidth in the image's spectrum, a simple and effective technique for dealing with these problems is to identify the interfering features in the power spectrum image produced by Fourier analysis, eliminate them, and convert back to image space.
In order to fully understand what you are doing here, you should know the basic principles of Fourier analysis; anyway, following this step-by-step how-to will let you removing any unwanted regular pattern over the picture you want.
Installing all the necessary software[edit]
This guide is Linux-oriented, mainly on Ubuntu Linux. Since Gimp is multi-platform, this section could be generalized to any OS. Please do it if you know how to do it
First we have to install all the necessary software. All you need is available for free on Internet.
On Linux, you have to download and install:
- Gimp (obviously!) www.gimp.org
- The gimptool utility: it should be within Gimp. Several Linux distributions put it in a different package. On Debian and Ubuntu it is called libgimp2.0-dev
- fftw, a library to calculate the Fast Fourier Transform of any signal. You can get it from www.fftw.org. It is available on Ubuntu and Debian repositories as fftw3 and fftw3-dev
- the Fourier Gimp plug-in, you can get it from http://people.via.ecp.fr/~remi/soft/gimp/gimp_plugin_en.php3. There is no package for Debian/Ubuntu, you have to install it from the source.
On Windows, to install the Fourier Gimp plug-in download the 'Binaries for Windows' from http://people.via.ecp.fr/~remi/soft/gimp/gimp_plugin_en.php3#fourier and extract its contents into the Gimp plug-ins directory (.gimp-2.xplug-ins in your user directory or C:Program FilesGIMP-2.xlibgimp2.0plug-ins).
Moire Remove Gimp Photos
An example of coherent noise[edit]
On the right, you see the picture of a flower with a coherent noise pattern on it. One might get a picture like this using a scanner. It is evident that the disturbance we want to remove is all over the picture, so it would be very difficult to remove with traditional means, such as blurring, sharpening or cloning. It is regular pattern, so it should be easy to remove in the frequency domain. Unfortunately, removing the coherent noise will cause the removal of some information that is contained in the same frequencies as the pattern. It is very difficult to preserve that information, and it will not be considered in this tutorial.
Edit the image[edit]
First open the image with Gimp. If it's coloured, it will be in RGB format and you'll have to manipulate the RGB layers separately. In order to do so, right-click on the image and choose 'Image > Mode > Decompose' (see screen-shot on left). Gimp will create another gray-scale image having the RGB as different layers
(With GIMP 2.6.4 'Decompose' can be found at: 'Colors > Components > Decompose...'.)
Choose RGB and press OK (see screenshot on right). This way you will get the decomposed picture.
Select the window with the new picture, go to the layers window (if you can't see it, go to 'File > Dialogs > Layers' and it will appear) and hide all but one layer, by clicking on the eyes. Then select the remaining layer. In the screen-shot on the left, I have isolated the blue layer. Now you can work on one layer without influencing the others. Let us convert it to its spectrum using the FFT plug-in: right-click on the picture and go to 'Filters > Generic > FFT Forward' (see again the screen-shot on left). Now you can manipulate the spectrum of the blue layer of the picture. Note: strictly speaking, the Fourier transform of a signal is made of amplitude and phase; Gimp will show you only the amplitude, and that is the only thing you can edit, but it is enough for our purpose.
Looking at the spectrum you should be able to see bright small spots. Those represent the spectrum of the noise you want to remove. Since it was very regular, its power will be very concentrated in the frequency domain. In the picture on the right, you can see the spectrum of the red layer, with two blinking arrows pointing where those spots are. The red layer was chosen just because the spots were more evident (that also means that most of the noise was contained in the red layer). All you have to do now is to delete them. If you were thinking about using the Erase tool, that's not such a good idea, because deleting the information completely will cause a sharp change in the spectrum, thus introducing even more coherent noise. You have to delete them smoothly. One way is to use the Blur tool - since it has an 'averaging' effect; if you use it on the bright spots, you will actually decrease its magnitude without deleting them completely. Another possibility is to use the paintbrush tool with a mid-grey colour (808080 in hexadecimal notation). You can not know exactly where the noise ends and where the information you want to keep starts. You might have to experiment a bit to get a good result.
After you have finished deleting the spots, you have to convert it back to the image space domain by performing the inverse FFT. Right-click on the picture and choose 'Filters > Generic > FFT Inverse' as shown in the picture on the left. Do the same for all the three layers.
After editing all the layers (remember to perform the inverse FFT on all of them!), you must mix them to get your RGB picture back. Right-click on the picture and choose 'Image > Mode > Compose' (see screen-shot on right). Here is your picture!
The result is on the left. There is still some noise, but the picture is much better than the original!
← Installing Plugins · Removal of Unwanted Elements in the Image →