0 home   1 linux   2 photography   3 devel   4 src   5 misc   
GreenWall.jpg

Highpass filter sharpening.

Step 0

This is the image we start with.

Step 1 - Copy the layer

Copy your background layer three times. We need only two copies, but I like to always have the original background layer intact in case something goes wrong.

Step 2 - Blur the image

Select the topmost layer. The one called 'blur' in the screenshot above. Blur the layer with Gaussian Blur (Filters - Blur - Gaussian Blur).

A value of 5-12 should be fine. The more you blur the more the effect will come out in the image. However, it is easy to overdo the effect. The best ammount depends heavyly on the image, so it's probably best to just try some values for yourself.

Step 3 - Invert the colors

Now, invert the colors of the just blurred layer. (Colors - Invert)

Step 4 - Set the opacity

Now for the intersting part. Set the opacity of the layer to 50%. As we have inverted the colors, each pixel that has not been affected by the blurring will add up with its underlying pixel to a neutral grey. This makes only the blurred edges visible.

Merge this layer with the underlying by right-clicking on the 'blur' layer and selecting 'merge down'. You now have one layer with only (ok, mostly) the edges. Again, the result of this merge depends on the image used. In the example, there is quite a lot of information present in the image. This is not always the case, but that's ok.

Step 5 - Adjust the amount of the effect

In some images, there will only be few edges present in the merged image. Bring up the levels tool (Colors - Levels). Adjust the input levels. Make sure you adjust the left and the right side equally.

Again the amount depends on your picture, but values from 50-100 are mostly fine. In the example I used 100 (from left and from right, making the right value 155). At this point it is not so important, if you overdo it, since the amount of the effect can be controlled later.

Step 6 - Set layer mode and opacity

To apply the modified layer to the image set the layer mode of the 'merge' layer to 'overlay'.

This is the maximum amount of effect. However, this is usually a bit too much, and doesn't look natural. You can now adjust the opacity of the 'merge' layer until you are satisfied with the result. Use the 'visibility' icon (the little eye) on the 'merge' layer to directly see the difference in the image with and without sharpening. In the example, I have reduced the opacity of the 'merge' layer to 50% for the resulting image, as can be seen in the direct comparison at the top of the page.