I have revised this technique. See the latest version here.
Here is an alternative to using the healing brush in GIMP 2.3. I think it its good because:
- It achieves good results
- It will work in GIMP 2.2
- Once you have set up the layers it is very quick to do
- My old computer, a 1GHz Athlon, has no problems with showing the brush strokes in real time.
- You have a lot more control
Read on to learn all about it.
For this demo I used a photo I found on flickr:
It is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 2.0
Part 1 – The set up
If you can write scripts for the GIMP you can automate this process. I can’t write scripts, so if you do write one I’d love to get a copy.
1. Duplicate the layer twice
2. Name the top layer ’16th size’
3. Name the middle layer ‘quarter size’
4. Resize ’16th size’ layer to 6% original size with linear scaling
5. Resize ‘Quarter size’ layer to 25% original size with linear scaling
6. Rescale both ’16th size’ and ‘quarter size’ layers back to the original image pixel dimensions using ‘Sinc’ interpolation (or Cubic if you are not using Gimp 2.2). Do not use percentages, use pixel values. Check that the both width and height values match your image size.
-At this stage you should have 3 layers of equal size, the original image, a somewhat blurry layer (called quarter size) and a very blurry layer (16th size)
7. Hide the ’16th size’ and set the ‘quarter size’ layer mode to Grain extract. This will give you a predominantly grey image with just the fine details or texture of the original.
8. Select ‘copy visible’ from the Edit menu. Paste this and make it a New Layer – Name this layer ‘Texture’
9. Make the ’16th size’ and ‘quarter size’ layers visible. Hide the others. Set the ’16th size’ layer mode to ‘Grain extract’
10. Select ‘copy visible’ from the Edit menu. Paste this and make it a New Layer – Name this layer ‘Features’
11. Delete the ‘Quarter size’ layer. Rename the layer ’16th size’ layer as ‘Shape’ and set the mode to ‘normal’ . Arrange the layers so in this order, top to bottom. Texture, Features, Shape, Background.
12. Set both ‘texture’ and ‘features’ layers to ‘Grain merge’. This will make it look like you have your original image back. Try hide different layers to see what happens.
– What you have done is split your image into three layers based on the size of the objects in the image. The ‘texture’ layer has only small sized objects in it. The ‘Shape’ Layer has only large sized objects in it. The ‘features’ layer has medium sized objects in it. Now we can edit different sized objects largely independently of the others.
Part 2 – Let the healing begin
1. Zoom in to 100%. Find the part of the image you want to edit. Show only the ‘Texture’
layer. You may need to engage the ‘Display filters’ Contrast setting to get a better idea of what you are doing
2. Select a hard edged brush. Clone over the wrinkles near the eye.
-Make all layers visible. You will see that most of the wrinkles have gone, and the skin looks realistic. The large dark wrinkle below the eye still exists, but we will remove that.
3. With all the layers visible, add a Mask to the ‘Features’ layer. Using a soft edged brush paint black onto the Mask in the position of the dark wrinkle below the eye. It should disappear. If you are keen, you can paint black onto the mask where there are any small blemishes.
If you decide that the fine texture is to great (e.g. skin pores too obvious), add a mask to the texture layer use it to vary the opacity of the layer in selective spots.
The final result (109kb):
Click to enlarge
- When you are resizing your different layers, keep in mind the size of the ‘texture’ in the picture. For large images you may need to resize the layers by 1/8th and 1/64th. Some trial and error may be required.
- When you are using the mask on the features layer you will find that things may start to look a bit strange near edges. Instead of using the mask to make the layer transparent, you may find you get a better results by blurring, or cloning the features layer.