29th Sep 2005, sjh
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
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:
- Create a selectively blurred copy of the image
- Subtract this blurred copy from the original image to get the difference image
- 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
- Other versions of this Tutorial: Photoshop
- Gimp plugin for this method: [Not yet available]
Create a blurred Image
- In the Layers Dialog, Select Background Layer
- Duplicate Layer
- Double-click the new layer and change the layer name to Blur
- 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 DifferenceThe 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.
- Select Blur layer
- Duplicate layer
- Select Background layer
- Duplicate layer
- Move layer up
- Select Blur Copy layer
- Change layer mode to Grain Extract
- Right-click blur-copy: select merge-down
Add on the Difference
- Change layer mode to Grain Merge
- Make Blur Layer invisible
Reset the ColourWhen 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.
- Rename the grain layer "Grain"
- Select Background
- Duplicate layer
- Up twice to bring to front
- Change Layer mode to Color
- Name this layer Color
Increasing the EffectTo 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.
- select the Grain Layer
- in image window, Layer->Colors->Curves and make a steep curve passing through the centre.
- Adjust opacity of grain layer to adjust effect.
Adjust SaturationThe 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.
- Select Color Layer
- From the image window, choose Layer->Colors->Hue-Saturation.
- Adjust the saturation to suit the image. In this case, +40