Detail Enhancement

29th Sep 2005, sjh

1) Overview

This method is designed to increase image detail in both shadows and highlights without affecting the overall brightness of the image. It is related to localised contrast enhancement and the unsharp mask, but avoids sharpening edges. Instead the aim is to accentuate the more subtle variations in the image. It is useful in high contrast scenes where an overall levels or curves adjustment would leave some areas washed-out.

Before → After

Procedure Summary

The basic technique is to perform an unsharp mask, but during the blur stage, to use a selective blur that avoids altering sharp edges. The steps are:

  1. Create a selectively blurred copy of the image
  2. Subtract this blurred copy from the original image to get the difference image
  3. Add the difference image back on to the original image to enhance all of the details that were lost in the blurred image.

As the high-contrast edges aren't blurred in the blur stage, then they are not enhanced when the difference image is added on. That is the primary change to the standard local contrast enhancement. Primarily, it allows the subtle variations to be enhanced much more, without the high contrast edges causing halos on the image.

2) Procedure: Gimp

Create a blurred Image

  1. In the Layers Dialog, Select Background Layer
  2. Duplicate Layer
  3. Double-click the new layer and change the layer name to Blur
  4. In the image window select Filters->Blur->Selective Gaussian Blur. Choose a radius of 30, and threshold of 50. For large radii and image sizes, this filter can become quite slow.


This is the most critical step, and the one with the most flexibility. It is the details that are removed at this step which are ultimately going to be enhanced in the final image. The radius controls the maximum size of detail to be affected, and the threshold is the maximum edge contrast that should be affected.

Calculate the Difference

The aim here is to create a new layer that represents the numerical difference between the original layer and the blurred one. The Grain Extract layer mode performs the subtraction, with an offset of 128 to allow negative numbers to be represented.
  1. Select Blur layer
  2. Duplicate layer
  3. Select Background layer
  4. Duplicate layer
  5. Move layer up
  6. Select Blur Copy layer
  7. Change layer mode to Grain Extract
  8. Right-click blur-copy: select merge-down

Add on the Difference

  1. Change layer mode to Grain Merge
  2. Make Blur Layer invisible

Reset the Colour

When this effect is applied aggressively the colour can suffer, but this can be avoided by altering the value/luminosity channel only. To allow the best flexibility for later adjustment, this is done by adding the original image back as the top layer, but in color mode.
  1. Rename the grain layer "Grain"
  2. Select Background
  3. Duplicate layer
  4. Up twice to bring to front
  5. Change Layer mode to Color
  6. Name this layer Color

Increasing the Effect

To make the effect more agressive, more gain can be added by using a curves adjustment on the grain layer. This is equivalent to adjusting the "Amount" in an unsharp mask. By default, without doing a curves adjustment, it is like an amount of 1.0. It doesn't hurt to put too much gain in here, as it can later be toned back by adjusting the opacity of the layer.
  1. select the Grain Layer
  2. in image window, Layer->Colors->Curves and make a steep curve passing through the centre.
  3. Adjust opacity of grain layer to adjust effect.

Adjust Saturation

The added detail will generally benefit from greater saturation in the image. Because there is a colour layer at the top, the hue and saturation adjustments are performed on this layer. Adjustments to the overall brightness of the image can be done with curves or levels on the background layer.
  1. Select Color Layer
  2. From the image window, choose Layer->Colors->Hue-Saturation.
  3. Adjust the saturation to suit the image. In this case, +40

Related Pages