Ringing-Free Sharpening with MultiscaleMedianTransform

Tutorial by Juan Conejero (PTeam)

This document is an adaptation of a tutorial posted by the author on PixInsight Forum in October of 2011.
Original forum thread.

One of the most exciting properties of the multiscale median transform[1] is the fact that it is a ringing-free transformation. This feature has very important consequences for image processing of all kinds of astronomical and daylight images, as we'll see in the examples that I am going to show in this tutorial.

Traditionally we have learned that no image sharpening is possible without creating ringing artifacts. These artifacts are a consequence of the Gibbs phenomenon. This is true when linear transformations (i.e. convolutions) are used as part of a classical sharpening algorithm, such as unsharp mask or high-pass filtering, or even with sharpening procedures implemented using more sophisticated linear algorithms, such as the wavelet transform. However, sharpening without ringing is actually possible using nonlinear operations. This is precisely what the MultiscaleMedianTransform tool does with morphological median filters in PixInsight.

The following landscape image has been shot with a Canon 450D camera. It has been loaded in PixInsight with the standard DSLR_RAW module, applying VNG debayering and in-camera white balance. The image has been stretched with the HistogramTransformation tool, and its global brightness, contrast and color saturation have been adjusted with the CurvesTransformation tool.

Below you can see a partial preview located on a region of interest, enlarged 2:1.

Let's apply a typical sharpening procedure by increasing the bias of the second and third wavelet layers with ATrousWaveletTransform. Note that the result that we obtain with this tool and the applied parameters is similar to what we would obtain with much simpler tools such as UnsharpMask, or a high-pass filtering process with the appropriate kernel filter, for example with the Convolution tool.

Can you see the ringing problems? They are indeed conspicuous at the edges of the stones and other features projected over the sky. In this case, we have mainly bright ringing artifacts generated by transitions from dark to bright image structures, a situation opposite to what is usual in most deep-sky astronomical images, where bright features generate dark ringing artifacts over comparatively dark backgrounds. However, the ringing problems and their originating mechanisms are exactly the same in both cases.

Enter MultiscaleMedianTransform. Same sharpening, no ringing:

Actually, the applied sharpening isn't quite the same. If you compare the three previous screenshots at full size, you'll see that not only the image processed with MMT has no ringing artifacts, but it has achieved more local contrast enhancement while preserving finer image structures, comparing both processed images with the original. This is a very nice and powerful feature of the MMT.

Here is another preview covering a larger section of the same image at the original 1:1 resolution:

Let's sharpen it with the MMT tool:

This is a small region of interest of the MMT processed image, zoomed 4:1:

As expected, even though we have applied a relatively strong sharpening effect, there are no ringing artifacts. Let's compare it with the same area processed with ATrousWaveletTransform (equivalent to UnsharpMask or Convolution with a high-pass filter):

In this case we have both dark and bright ringing. Dark ringing can be clearly seen around the clouds, and a severe bright ringing artifact has been generated at the transition between the mountains and the sky. None of these have been generated by MultiscaleMedianTransform, which has preserved finer image structures with similar or superior local contrast enhancement.


[1] Starck, J.-L., Murtagh, F. and J. Fadili, A. (2010), Sparse Image and Signal Processing: Wavelets, Curvelets, Morphological Diversity, Cambridge University Press.