Author Topic: MultiscaleMedianTransform - Sharpening Example 1  (Read 13417 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
MultiscaleMedianTransform - Sharpening Example 1
« on: 2011 October 31 01:33:07 »
As I advanced in a previous example, one of the most exciting properties of the multiscale median transform 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 I'm going to show here.

So far 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 advanced linear algorithms, such as the wavelet transform. However, sharpening without ringing is actually possible using nonlinear operations. This is precisely what the new 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 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.


This is 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 using 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, e.g. 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 background. In this case, we have mainly bright ringing artifacts generated by transitions between dark and bright image structures, a situation exactly opposite to what is usual in most deep-sky astronomical images.

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.

This 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 a similar or superior local contrast enhancement.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: MultiscaleMedianTransform - Sharpening Example 1
« Reply #1 on: 2011 October 31 03:01:26 »
This looks exciting. Is the Tool intended for daylight Images ?
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: MultiscaleMedianTransform - Sharpening Example 1
« Reply #2 on: 2011 October 31 03:23:34 »
Hi Georg,

I am using daylight images on purpose. They are great to get you guys out of context, which is good to evaluate results with the necessary perspective :) On the other hand, I also want to fight the myth that PixInsight does not work for daylight images. It does, and does it very very well!

MMT works for all kind of images. However, I have optimized the implementation for deep-sky astronomical images. The structuring elements used for median filtering at successive scales are extremely critical. I have implemented a set of structures that try to preserve isotropy, which is essential in most astronomical images. This in turn introduces some weaknesses in the implementation, as I'll describe in the next example.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

astropixel

  • Guest
Re: MultiscaleMedianTransform - Sharpening Example 1
« Reply #3 on: 2011 November 13 20:47:35 »
And just when I was getting on top of ATWT. I haven't had time to get around to reading about MMT. Virtually all my image processing is done in PI and MMT's application to macro and bird photography is obvious. Have to find time to reprocess some favorites.