In this section, we investigate the 1-D Haar Wavelet Transform. The Haar Wavelet is a very simple and one can think of it as a scaled and shifted Unit Step or Heaviside Function of sorts. Indeed, one is approximating their signal by discontinuous functions.
As seen above, one approximates their function by shifting and scaling their Haar Wavelet over the course of their signal. It is not very hard to prove the orthogonality or the orthonormality of the Haar Basis. It can also be shown that one can approximate a continous function, to the scale of their desire with these discontinous Haar Wavelets. Haar Wavelets can be used to filter out noise and for data compression as well. For example, with data compression, one can discard the components that are smaller in amplitude. Now, it might seem that approximating a signal with Unit Step functions could be a bit crude. That is understandable. Fortunately, one is able to perform this transform at finer and finer scales. Specifically, "The Haar Transform operates over scales. It computes a series of coarse scale and fine scale coefficients
That means that we are able to scale the simple Haar Wavelets down to finer and finer (i.e. smaller) intervals, in order to get a better approximation of the signal. From these finer scales comes the ability to perform filtering and data compression. The forward Haar Transform is given by:
Notice from the above formula, that the low frequency components are not stored. One performs the Haar Transform in the following manner:
and
Plotted below is one step of the transform:
The first half of the Transformed plot consists of low frequency components, the latter half contains the coarse coefficients. With the help of Mr. Peyré's code, we can view the subsequent Haar Coefficients, on the 6th, 7th, and 8th scales.
These plots, starting at j=8 show the coarse scale coefficients and the subsequent coarse scale coefficient of the next two iterations.
To summarize what has been done, Mr. Peyré's code was able to itertively calculate the Haar Coefficients. As j increases, one is able to examine the coarse scale coefficients in higher and higher detail. This is representative of the multi-resolution characteristics of Wavelets, and is something Fourier Analysis tools cannot achieve.
Of course, we must reconstruct our signal! This process calculates a signal from the Haar Coefficients. These are given by:
I'm going to skip over the exact formula for doing so, and go directly to commenting of the plots below:
One can see easily that the reconstruction of the signal gets better as j gets bigger. This is because at each stage, more details from the high frequencies are added to the signal reconstruction. For example, consider the case of a Hard Linear Approximation. This kind of filtering is very simple - coefficients after a certain arbitrary value for j are discarded. Mr. Peyrè decides to cut off the coefficients above the value of j = 8. Therefore, the "best" approximation one can get is from the coefficients of j = 7.
To conclude, in a similar manner to previous filtering technqiques, a Non-Linear Approximation is implemented by Mr. Peyrè. In this method, a thresholding operator checks to see if the absolute value of the Haar Coefficients is greater than a certain value. If it is, it is kept, if it falls below it, the coefficient is replaced by a zero. Again, this leads us back to sparse representations of signals. Mr. Peyrè decides to use a value of .5 for the thresholding operator. This yields the following filtering of the Haar Coefficents:
Lets see what our reconstructions look like:
The results here should hopefully make perfect sense. As we add more coefficients containing high frequency information, our reconstruction improves. This allows us to do varying degrees of compression which is extremely relevant in todays world where people want to send each other images, pictures, and video.
Next, I continue the study of the Haar Wavelet, this time, in two dimensions.
Works Cited
(1) Peyré, Gabriel. "1-D Haar Wavelets." 1-D Haar Wavelets. N.p., n.d. Web. 02 June 2014.
(2) Peyré, Gabriel. "1-D Haar Wavelets." 1-D Haar Wavelets. N.p., n.d. Web. 02 June 2014.
(3) Peyré, Gabriel. "1-D Haar Wavelets." 1-D Haar Wavelets. N.p., n.d. Web. 02 June 2014.
(4) Peyré, Gabriel. "1-D Haar Wavelets." 1-D Haar Wavelets. N.p., n.d. Web. 02 June 2014.
G. Peyré, The Numerical Tours of Signal Processing - Advanced Computational Signal and Image Processing, IEEE Computing in Science and Engineering, vol. 13(4), pp. 94-97, 2011.