Author Topic: What is a wavelet?  (Read 5149 times)

Offline dsnay

  • PixInsight Addict
  • ***
  • Posts: 100
What is a wavelet?
« on: 2011 February 13 13:33:44 »
I feel dumb asking this but I've always been told there is no such thing as a dumb question.
What the heck is a wavelet and why are there multiple levels of them?

If wavelets are so powerful (which I believe they are) it makes sense I understand them to make best use of them.
They've been in Registax forever, and I've used them for planetary image processing there. But it's been the ole try a value and see what it looks like kind of use.

Thanks,
Dave

Offline Philip de Louraille

  • PixInsight Addict
  • ***
  • Posts: 289
Re: What is a wavelet?
« Reply #1 on: 2011 February 13 14:30:14 »
It is a mathematical transform akin to Fourier transforms but, of course, different. Wavelet decomposition can handle discontinuities and sharp spikes, Fourier transforms, ... , not so much.

Good synopsis here: http://www.amara.com/IEEEwave/IEEEwavelet.html

The main advantage of wavelets over Fourier is that individual wavelet functions are localized in space while Fourier sine and cosine functions are not.
Philip de Louraille

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: What is a wavelet?
« Reply #2 on: 2011 February 14 06:40:58 »
Amara Graps' introduction to wavelets is great; I probably would have suggested the same resource.

Besides being localized in space, wavelets are more versatile than Fourier transforms because wavelets can use arbitrary scaling functions (or 'wavelet basis' functions), while Fourier use the sine and cosine functions exclusively. However, the Fourier transform is unbeatable when it comes to isolate periodic image structures, or features that can be well characterized in frequency, such as regular patterns and interference artifacts.

In PixInsight, most tools use the à trous (with holes) wavelet transform algorithm. Unlike the pyramidal algorithms (such as the ones described in the introduction above), the à trous algorithm is redundant. This means that each scale (or wavelet layer) is an image with the same dimensions as the original. This property allows us to implement powerful transformations accurately without the risk of generating artifacts. Another advantage of the ATWT algorithm is that the inverse transformation (reconstruction) is just the sum of the decomposition layers. The algorithm is both versatile and computationally efficient.

In PixInsight, we are just starting to scratch the surface of wavelets. We have a large amount of work ahead. For example, during the next months you'll see new wavelet-based tools, such as a morphological wavelet transform tool (a wavelet transform based on morphological median filters instead of convolutions), and significant performance improvements in all wavelet-based tools. Besides wavelets, there are many more lets. For example, ridgelets and curvelets allow isolating structures not only as a function of their scale, but also of their orientation.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Philip de Louraille

  • PixInsight Addict
  • ***
  • Posts: 289
Re: What is a wavelet?
« Reply #3 on: 2011 February 14 06:59:48 »
Wow... Looking forwards to the appearance of these new tools in PI!
Philip de Louraille

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: What is a wavelet?
« Reply #4 on: 2011 February 14 09:02:50 »
Quote
Wow... Looking forwards to the appearance of these new tools in PI!

Me too! lets see them soon.   :D

Offline dsnay

  • PixInsight Addict
  • ***
  • Posts: 100
Re: What is a wavelet?
« Reply #5 on: 2011 February 14 11:13:07 »
Okay, I read the reference material I think I understand the concept. We're using the concept of little waves (wavelets) to isolate segments of the data so that they can be manipulated individually rather than the whole image at once. Sort of like cutting hair, you don't cut all the hairs on someone's head the same amount. You just cut what needs to be cut the get the look you want. (I bet nobody ever made that comparison before!).

What I don't quite grasp is why we use multiple layers of them to effect the scale of the subject matter manipulated. I see this value in both the HDRWavelet function as well as in the Deconvolution function (it's probable elsewhere as well) and in both places it tells me to increase the number of layers to increase the scale.

So if I understand this correctly, I would probably be served best by running HDRWavelets multiple times with a variety of settings if I have an image that has a very wide dynamic range (like the Orion Nebula). Would it matter which order I run them?

I also assume it's best to run this on non-linear data, but I really don't know I feel that way.

Thanks again guys!
Dave

Offline Philip de Louraille

  • PixInsight Addict
  • ***
  • Posts: 289
Re: What is a wavelet?
« Reply #6 on: 2011 February 14 11:33:24 »
I think that the ATrousWaveletTransform is mostly applied with a linear image while the HDRWaveletTransform is used when the image is non linear. But, you can still definitely still use ATWT late in the game when you want to remove additional noise as you are finishing your image.

At least, this is what I understand.
Philip de Louraille

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: What is a wavelet?
« Reply #7 on: 2011 February 15 01:21:20 »
Hi Dave,

The key word of wavelets is scale. But the really important part here is not wavelets, but multiscale processing. In fact, we really don't need wavelets; we can implement a multiscale processing scheme with other devices, including bandpass filters, morphological filters, etc.

A multiscale analysis procedure allows you to isolate structures in a data set and classify them as a function of scale, which in the case of an image, we can identify as size in pixels for practical purposes. For example, in a deep-sky image, we have many different structures that we can classify according to size. Stars are relatively small structures. High-frequency noise (the most visible noise component) is composed of very small structures. Nebular features range from medium-sized to large-scale structures. And so on.

I wrote a brief introduction years ago, in 2004 if I remember well, pertaining to the documentation for the old (now discontinued) PixInsight LE application. I'm rescuing this material to write the current documentation for several wavelet-based tools, including ATWT:

http://pixinsight.com/doc/legacy/LE/20_wavelets/understanding_multiscale/understanding_the_multiscale_language.html

There is (at least) an error in this document: in the second paragraph, where it says 'Universal Time scale', it should read 'local time scale'.

Hope this helps.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline dsnay

  • PixInsight Addict
  • ***
  • Posts: 100
Re: What is a wavelet?
« Reply #8 on: 2011 February 15 02:35:52 »
Thanks Juan,

Your description here further confirms what I thought I understood. I'll be sure to have a look at your reference material later today.

Clear skies,
Dave