GIMP Plugin: Wavelet Decompose

Published › December 2, 2011 0 Comments


This plugin losslessly decomposes a layer of an image into layers of wavelet scales. This means that you can edit the image on different detail scales (frequencies). The trivial recomposition of the image can be done by GIMP’s layer modes so you can see the results of your modifications instantly. Among the applications are retouching, noise reduction, and enhancing global contrast.

Wavelet Scales

An image can be transformed into a set of wavelet scales. There are detail scales and one residual. The detail scales contain the image details of a their scale size. This means that scale 1 contains only image details of the smallest scale. Scale 2 details are larger and scale 3 details even larger (and so on). This image illustrates this:

This plugin computes these scales losslessly and creates a new layer for each one. The recomposition is the addition of all scales which is done by GIMP using the grain merge layer mode. You can then paint the scales with your favourite tool, using (128,128,128) as neutral colour (for the details, not the residual). Values below neutral darken, values above lighten. The most straightforward thing to do is to use the paintbrush tool with the neutral colour and use different brushes and opacities. That way you erase details.

Skin Retouching

The problem with skin retouching is retaining skin detail but erasing spots and such. However, one might want to keep freckles in the face (see image below). Achieving this is very difficult when operating in the normal image space. The skin details such as pores and hair are very small, spots and pimples are larger. If you erase the larger spots (with an airbrush for example) you hide the skin details inside it. With wavelets you decompose the image into scales of different detail size. To state it simply: One scale will contain the skin details like pores, other scales contain spots. They are rather nicely separated. Look at the image with the wavelet scales above. The first scale contains pores and freckles (it’s a small image indeed) and the second and third one the spots. The problem is not separating the details from the spots anymore but finding out in which scales they lie. This image (taken by +psv) has been edited using wavelet decomposition. One could have erased the freckles easily, but this natural face is beautiful because of them.

Noise reduction

The human eye easily distinguishes noise from image detail. Computers cannot. By decomposing the image into wavelet scales you can decide for yourself which parts are erased and you get the most high quality result. For example in image regions which are out of focus you know there can’t be any image details on the pixel size (they are just blurred). So you can pick a brush and erase wavelet scales 1 and 2 in such places. Image details of greater size are untouched by this as you will notice.

Local Contrast

If you change the residual scale instead of the detail scales you can change the brightness of the image or global contrast without affecting local contrast. This means that you can get image details back out of dark image areas in full local contrast. This works for overexposed areas as well. However clipped image details (beyond white or black) cannot be restored.

Download Plugin


Leave a Comment