first pic: close up of original, second pic: color noise removed with bilateral filter, third pic: close up of final image
How We analyze the problem
Sharpening and noise reduction directly affect each other. When reducing noise, the picture becomes blurrier. Increasing sharpness can enhance noise, and create sharpening artifacts. Taken to the extreme, noise can be eliminated, and sharpness can be enhanced, at the cost of loosing all the details in an image. This is undesirable. We need to find an optimal solution that doesn’t blur the image too much when applying noise reduction, and doesn’t produce too many artifacts when sharpening. How much is too much depends on the image and personal taste.
When to sharpen and remove noise
If there is noise remove it, before processing the image. Color noise noise should always be removed. Some people like to keep luminous noise. If you want some noise you can leave some of this type of noise, but you should normally remove this too.
Unless you are going for a soft affect sharpening should be applied to an image. It is often said that you should do this as one of the final steps. It isn’t critical that you apply sharpening as the last step, just know if you don’t, the amount of sharpening applied can change, especially as tones in an image are manipulated. All of your noise removal should be done before you start sharpening.
Where to sharpen and remove noise
Often the luminance channel is the best channel to use, but sometimes other channels are better. Looking at the amount of noise on all of the channels will tell you which one is the best to use. I don’t usually spend time looking at different channels, for the most part the luminosity channel works well.
Using the filters described below I removed the color, speckled, and some luminance noise. There is still some luminance noise, and some bigger patches of noise in the image i.e. the white patches in the shirt. This noise can’t easily be removed without destroying the image. I would have to go in and manually do some cloning, or use some other technique to remove this noise.
This noise is the most annoying yet it is very easy to remove, and does little damage to an image. In most cases all that has to be done is a bilateral filter on either the AB channels in lab mode, or the blue and red chrominances. The bilateral filter will blur the image while keeping the edges of objects from being blurred.
Sometimes color noise will come in large patches. The bilateral filter will be fooled into not blurring the patch of color because it wants to preserve edges. Fortunately the color channels can take a lot of blurring. For best results blur the patches that are causing you trouble. If you don’t want to take time to selectively blur part of the image, you can try different flow and blurring filters. The bilateral filter will also consider less of the image to be edges if you apply a small blur first.
Unlike color noise you need to be much more cautious when removing this type of noise. color noise should be removed first so that the luminance noise is easier to see. luminance noise is difficult to remove, and sometimes you may wish to only partially remove this noise to allow some of the finer details to show through. A few noise reduction filters are described below.
G’MIC’s anistropic filter
This filter blurs areas where noise could appear in a swirly anistropic like fashion. It’s sort of like a bunch of small paint strokes blurring the image. This filter keeps these “anistropic paint strokes” from crossing over edges. It is a good all around filter for reducing luminance noise. This link
explains what all the sliders in the anistropic filter mean.
G’MIC’s Patch based filter
This filter doesn’t seem to remove noise that well, instead it blurs the noise into patches. It may work better if bigger patches are used, but the filter goes extremely slow if you try to do this. Use it to reduce noise into bigger but less noisy splotches.
This filter eliminates detail and noise, but unlike a gaussian blur the edges of an image are preserved. Be careful, this filter is very destructive. Besides using this filter to remove color noise, it should only be used if you actually want to remove detail. This is often the case with shiny metallic or plastic objects.
G’MIC’s hot pixel filtering
This will remove the very bright and dark pieces of noise. This filter is best used when removing little pieces of noise. Recently I’ve found many of my pictures would benefit from this filter. whenever you see speckled noise that is very bright or dark, try this filter. I’ve also had some good luck with this filter at reducing big splotches of high contrasty noise. The filter was really slow when I did this.
wavelet denoise filter
This filter hasn’t seem to work that well, but recently I used it on a picture that had bigger patches of noise, and I found that this filter works well for removing big patches of noise.
Selective Gaussian blur
This is a more rudimentary filter, that I don’t normally use for noise reduction. The filter is the same as a gaussian blur, except that it will not blur pixels that blur more than a given threshold.
I don’t normally use these filters, but they can produce some good results. These filters are the NL filter, the despeckle filter, and the median filter.
The most common sharpening filter is the unsharpen mask (USM) filter. A high pass filter is a USM filter before it is merged down. There is no difference. Photoshop’s smart sharpen filter is just a USM filter applied on the luminance channel only. As sharpening is mainly an operation done on the tones of an image, it is best to use the luminocity channel, so you don’t have the colors messing with the sharpening algorithm.
Most sharpening filters are applied to the edges of an image and to the details in an image to. If you only want to sharpen the edges you can use an edge detection filter, and then mask out everything but the edges. You will need to grow the mask a bit when doing this. If you don’t want to detect details the best edge detection filter is the adaptive edge detect filter. A version of this has been implemented in GMIC. Look under the contours section for different edge detection algorithms.
Manually applying a USM
It can be helpful to know how the process of a USM filter works. To manually apply a USM using Gimp
- open up an image.
- Duplicate the layer and blur it.
- Change the layer mode to grain extract.
- Right click on the layer and select new from visible.
- change this new layer to grain merge.
- Go back to the blurred layer. Changing the layer mode back to normal will give you the original image. Deleting this layer will give you a sharpened version of the original image.
explains how to manipulate the USM process to sharpen on specific layers, and to mask out everything but the edges when sharpening.
High Pass Filter
This filter is the same as an unsharp mask filter. Seriously. Every time you run the unsharp mask filter a high pass layer is created and merged down. Because the high pass filter gives you less control over the entire process, it is generally better to use a USM filter than a high pass filter.
A good technique is to use this filter on a layer that hasn’t had any noise reduction applied, and then move the high pass layer above all the layers that have had noise removed from them. This will allow you to recover detail that has been smoothed out from the noise reduction.
This is one of my favorite filters for pictures that have a lot of noise. The shock filter sharpens without increasing noise. However it looks awkward when viewed up close. It creates this wavy pattern as it sharpens the edges of a picture. The first picture I showed of a bird has had a shock filter applied to the last image in the series. You can see the wave-like pattern along the edges of the bird.
RL Deconvolution Filter
This filter seems to enhance the little details and big details an in image evenly. This has the affect of enhancing any noise, so don’t use this filter in noisy images. In G’MIC this filter is simply called deconvolution.
Sharpening with Synthesis FILTER
This filter is very confusing. Using this filter will add a texture to the picture. There was one case where I used this filter, and it was superior to any other sharpening filters, but that case seems to be the exception. If you want to mess with this filter, you’ll need to first get the resynthesize filter. The filter leaves you with a very weird looking image. You’ll want to extract the high frequencies from this image. I will be talking about extracting high frequencies in my next article. The filter is also very time consuming. On my test image I found that a strength of 1 finely sharpened the image. A strength of 2 and 4 completely destroyed the image. A strength of 8 add a thick texture while sharpening the image. A strength of 16 and 32 added too much texture, and didn’t seem to be doing much sharpening anymore.
Sharpening by synthesis example. First Pic: Original image, second pic: strength of 1, third pic: strength of 8
Octave Sharpening Filter
This filter is similar to the unsharp mask. If I showed two images, one done with the octave sharpening filter and one done with the unsharp mask filter, there would be no way to tell the two images apart. It’s hard to say one is better than the other, the two filters are basically interchangeable.
Sharpening Tutorial from Cambridge in Color
Manually Sharpening an image
A technical article talking about sharpening in terms of frequencies