Navigation : Home : Optipix : Optipix User's Guide : Safe Median

Optipix User's Guide:  Safe Median



Safe Median is not your typical noise remover. Unlike the built-in median filter in Photoshop, Safe Median preserves corners, even through multiple applications of the filter. This means that the fine detail in your image will survive Safe Median in better shape, giving you a cleaner, crisper image. This makes Safe Median an excellent choice for performing grain removal as well noise removal. Safe Median is also color-preserving. We've constructed an example that illustrates how this works.

The Safe Median dialog looks like this:

Safe Median Dialog

The slider controls the radius of the neighborhood, and thus the degree of noise removal. The Safe Median plug-in can be applied multiple times for higher levels of noise removal. It is often better to apply a smaller radius Safe Median multiple times than to use a larger radius Safe Median.

A good example of the use of Safe Median is illustrated by the following segment of a digital camera image.

Rocks, noisy.

This image shows a lot of noise around the boundary between the sky and the rocks in the foreground, including a nasty bright spot between two of the rock peaks. We'd like to make that better. Running a radius 1 median over the image doesn't quite take care of all the noise, especially that bright spot. However, increasing the radius of the median to 2 results in an image that's too blurry. Even fading the median leaves a loss of detail, resulting the following image.

Rocks, too much median.

Photoshop's median filter has removed the noise at the expense of some of the fine detail in the rock boundaries. There are other methods of repairing this, typically involving layers. We'd like something that is one-click. Let's take a look at what Safe Median does to this image.

Rocks, safe median.

The noise is gone, including the nasty bright spot, but the detail of the rocks is preserved.

For another example, let's look at the following segment of an image:

Sunglasses, noisy.

You'll notice the speckle noise in the mirrored lens. This detracts from the quality of the image. A high-quality print of this would show these sunglasses as having 'dust' on them. We'd like to remove it. Using a median filter is problematic in this case, as it tends to remove the detail from around the boundary between the frame of the sunglasses and the lens. While it is certainly possible to mask the lens and apply a normal median, this is extra work. It also tends to smear the specular highlight on the lens somewhat.

Safe Median can be applied to the whole image, without masking. It preserves that detail, both of the lens boundary and the specular highlight, while removing the 'dust' that we want to be gone. After application of Safe Median, the image looks like this:

Sunglasses, fixed.

Safe Median is, unfortunately, designed for a faster class of processors than the rest of the Optipix package. If you do not have a top end machine, you will find that Safe Median is a little slow. The results of Safe Median are worth the wait.


Next: Power Median
Prev: Safe Sharpen
Up: Optipix