 So, first of all, I'm sorry, but my German is really bad, so I will do everything in English, but I hope that I will do something in German for the next good programming act, okay? Let's see. Anyway, welcome. First of all, I want to ask some questions to you. How many of you know what Fourier transform? Lift your hand. What's the Fourier transform? You know, okay. How many of you know what a wavelet is? Okay. How many of you know how to calculate the coefficients of the WC wavelets? Nobody. Okay, very well. Because I never found anybody who does, and this is the Bible of wavelets, and this guy doesn't know. Apparently, just that Mrs. WC knows how to calculate the wavelets. Okay, very well. So, let's get started. Okay, this is a very quick overview. Basically, what the hell are wavelets? How they are implemented? And this is just some pictures. So, nothing really important. So, what is a wavelet? There is a wavelet. It's the WC for wavelet. Actually, it's two functions, the scaling functions, function, and the actual wavelet function. Yeah, they look strange, but yeah. So, and this is how they are defined. Basically, all wavelet functions, by definition, have compact support. That means that, except for an interval in which they are allowed to be non-zero, outside the interval they must be zero. This is important. So, they are well defined in, if we can say, in the time. I mean, they have some value in a given moment of time, and then they are zero. So, the scaling function is the solution of this equation, and the wavelet is the solution of this equation, where those two are coefficients. This is a group of coefficients. There can be n different coefficients for the scaling function and another set of coefficients for the wavelet function. The coefficients themselves basically define the wavelet and the scaling function. I will not explain too much, unless somebody is really interested in this. Well, of course you can ask anytime on what exactly all this means, but basically, this is like a filter. Yes, sorry? Yes, yes, this is correct. This is correct. Is that that one? Yes. Yes, this is why they define. So, this is, this is defined as the solution of this equation, and C is defined as the solution of this equation with the scaling function inside. Okay, and the scaling function is the solution of this equation. Yes. And for some wavelets, we can know the closest form for creating the actual shape of the function, and for other functions, for the wavelets, like this one, for example, WG, we only know the coefficients used for the filter. So, basically, we only know the values H0s and H1 coefficients. So, what are, I mean, how do we use these wavelets? The point is that there's this thing called wavelet transform, which is really like the Fourier transform. What's the point of a Fourier transform? Basically, with the Fourier transform, we are projecting the function on a various exponential, basically, sine and cosine, right? So, we are performing a change of basis from the time domain to the frequency domain. That's, that was the Fourier transform does. So, basically, we are, I mean, instead of doing that with the sine and cosine, which have a very definite frequency value, of course, it's the frequency, but they don't have any, they don't give you any indication of where those frequencies are happening in your input signal, because they're the same infinite from left to right, basically. So, instead of doing that, you just calculate the correlation between your input signal and the wavelet and the scaling functions. So, what's, basically, you might ask what's the advantage of doing it with the wavelets? The point is that with the Fourier transform, you don't get any indication of where frequencies are happening in your input signal. What can be done is to do a windowed Fourier transform. So, you do Fourier transform on sub-segment windows of the signal, so you get some idea of where things are happening, because, you know, that particular frequency, for example, is going on in that window and not in the next one, but still you don't get the best you can get. The wavelets allow us to reach this limit more closely. We cannot, of course, we cannot break it, because it's impossible, but we can get closer to that than what we can do with the standard Fourier transform. Yeah, any questions so far? Okay. So, basically, projecting the function onto the wavelets is exactly the same as applying a couple of filters, a high-pass and a low-pass filter, and the coefficients, the coefficients of the filters are exactly this H0 and H1 that were expressed in the formula before. Here. Those are exactly the coefficients of the filters. And the interesting thing is that after you filter the input signal, you can down-sample it. You can discard half of the samples. So, in the end, we get the same number of samples we had in the input. So, basically, we have, as an output, the same number of elements we had in input. So, this is a transform, because we are just changing the basis, okay? And not just filtering, because otherwise any filter would be good, but no. So, basically, one thing that defines a wavelet is basically if it is possible to have a couple of high-pass and low-pass filters, if you filter the signal with the high-pass and low-pass, and then discard half of the samples, basically, if it is possible to perfectly reconstruct the original signal, then that's a wavelet. So, oh, typo, yeah. So, how do we reconstruct the original signal? Basically, it's crazy. It's so simple, but the things behind it are apparently so complicated. Basically, you just take the signal up-sampling and filtering again with the same coefficients, and then add. In case of orthogonal wavelets, those filters are actually the same, otherwise they are not the same, but they can be calculated from the actual coefficients, okay? So, it's not like magic, well, looks like, but it's not. And for orthogonal wavelets like the WC wavelets, they're actually the same values. Why I say orthogonal? It's because the orthogonal wavelets are actually a basis of the space that we are trying to represent. So, it's the minimal set of functions that can represent the whole thing. I say this because it is possible to have non-orthogonal wavelets, that is, wavelets that are not, I mean, functions that are not linearly independent, but still allowing perfect reconstruction. That's interesting. So, one common thing that can be done in implementation, for example, and that's something, for example, that I did when I implemented something with wavelets, is to filter with the low pass and the high pass and then take the high pass or the low pass in this case and filter again, and again, doing several steps. This is quite useful in sound processing, for example. This is kind of obvious in this case. More typos. Well, because usually signals are, some parts are interesting and some parts are not really interesting. Anyway, since basically we are just filtering, and even in this case we are filtering a finite number of times, it is easy to see that the first wavelet transform is actually linear, linear complexity, which is better than the Fourier transform, which is n log n, as we know. So, let's see, for example, change of base metrics for the, for simple wavelet. So, I'm using, I forgot to put a picture here. Well, I'm using this wavelet. That's called hard wavelet. Basically, this is the scaling function, this is the wavelet function. Okay? So, this is the scaling function, this is the wavelet function. Combining the two matrices and sampling immediately we have, we still have a square matrix. And so, combining again the, in the 4x4 cases, the low pass with the high pass and some, some sampling immediately, we obtain this. And if we combine the previous 2x2 with this 4x4, we obtain this. And what we obtain, we obtain this big thing here, this, which is the wavelet function, again, stretched and these, not stretched but translated. And if we repeat, we obtain exactly the same thing. We have the big scaling function here, the big wavelet function, the wavelet function stretched and translated, and the wavelet function not stretched but translated. And this is, basically, this is the, this is really cool. So, yes. What did the number represent in the matrix? The, the, the... Are they the coefficients? Yeah, coefficient for a change basis to, to, to transform an input vector from the time domain, basically, to this mixed time, time space, wavelet domain. So, these are just coefficients. And in particular, these, these are exactly the coefficients of the filter. This is the, exactly a filter, basically. This is nothing more than, than a filter. The interesting thing is that the big picture, you get this thing here. And if you put a vector here, then, and you do the calculations, you get the, the wavelet transform of that particular input vector. You can just repeat with a bigger vector, and you, you get the, the thing for the, for the whole signal. Okay. So, any questions so far? By the way? Because I, I tend to run too much, actually. I've been sorry for this, but, yeah. Is how a function is only a special example, or is it, has it special? It's the easiest function, because it's just one, one, one mirrors one. And it's also the first wavelet that was discovered before they got the name, actually. Yes. It's actually, what, what does it mean, this, this thing here? Basically, it's, this is the mean average, and this is the difference. So, if you take a signal and you take the, the average of every two values, and then you take the difference, and then, then you can throw away half of your, of your output samples, and still be able to perfectly reconstruct. And this, this is also the, the first of the WC wavelets. It's, it's the WC to wavelet. So, more questions? I'm sorry for, for running this much, but, okay. Yeah. Yes. If you apply this to a vector, you obtain a vector, which is the representation in the wavelet space of the input vector. Just like if you, if you transform a vector with a matrix for the Fourier transform, you obtain the Fourier transform of the vector. And here you obtain the wavelet transform of your input vector. So, the implementation is actually incredibly stupid, because you need to do a convolution, which you can find in math libraries, or you can implement from scratch. I mean, this is, this is my implementation from a project I did in the university some years ago. It's just that. This is the, the, the, the fast wavelet transform. And this is the reverse transform, which is more complicated just because this is not just a simple transform, but this is a dyadic transform like this one. So, it, because it's recursive. That's why it's complicated. Actually, it could be just this, this part here for, for the simple transform. It's just a convolution, basically. That's the, that's the point of the, of the transform. So, this is the, the very basic basic stuff about this, this wavelet, this crazy, crazy wavelet stuff. Any, any questions so far, before I start? What is the formula now? Who came up with it? Honestly, I don't know. I, I could look it up, but perhaps the Mrs. Doctor, I presumed that was she, who invented all the crazy orthogonal wavelets. Nobody knows, nobody really knows how to calculate the coefficients. Yes? I don't know if you will get into that, but could you talk more about the application of the wavelet? Because it's a filter, it's a reconstruction, but filters are something different than reconstruction. So, what would you use it for? Oh, sorry. Okay. So, filtering, what did you, okay. Filtering, basically, it's just one way to implement, to implement the wavelet transform. Filtering and then discarding half of the values. And reconstructing because you want to reconstruct the original signal from the transform values. So, basically, reconstructing means doing the reverse transform. Yes, but give me, give me an application. Sound processing, sound compression. Sound processing. Sound compression or video compression. You can use wavelets the same way you can use the Fourier transform. There are several codecs which use the wavelet transform. For example, the JPEG 2000 standard uses wavelets for compression. And you can see that the picture compressed with the wavelet transform is not as blocky and there are less artifacts on the border on, you know, all that stuff that's typical of the Fourier transform. Yes? Well, it's, it's, well, this is a way to implement, to implement it. Not really efficient to implement the matrix multiplication to perform a filtering, but this was just to show that it's just a change of metric, a change of basis. Okay? That we are changing the basis, but it's the same data that we are handling. Actually, a wavelet is a couple of functions. This is a wavelet. Okay? The point is that sometimes you know the function. Sometimes you only know the coefficient of the filters, which are these two here, which you also put here and then, or here to do the convolution, basically. And the way I, for example, the way I got this picture was to simply to take an impulse and to transform it several times using the coefficient. There's no way to, to actually find the formula of this function. But for other functions, you have the formula. Okay? Don't have some scaling and we don't have a challenging mathematics. If you don't have the definition of the function, you can still have the coefficients with which you can implement the filters. And that's exactly what happens with the double sheet wavelets, for example. Only, because basically, apparently the only way to find the coefficients is to Google them or to ask her directly. I tried, even on the Bible here, it doesn't really explain how to calculate the coefficients. It says something about that, but then it's not clear. There are some missing steps. There's a whole chapter, a whole section dedicated to how to calculate the coefficients of the double sheet wavelets. And it's incomplete. There are some missing steps in the middle. So, okay. Sorry? No, no, because I hope she knows how to calculate her wavelets. Now, this is by Stefan Malat. And actually, it's really nice. And if you need some introduction to wavelets, I really suggest you to buy this. Because it's really nice, well, buy or buy whatever it works. Yes, more questions? Don't be afraid. Okay. So, okay. I've been running too much. Well, but I can show you some of the wavelets, for example. This is the hard wavelet. This is the WC4. This is the WC6 and 8 and 10. If you see, they get smoother when they go up with the number of coefficients. This has 12 coefficients, 14, and this has 16 coefficients. It's quite a big filter. I don't know what the JPEG 2000 uses. I didn't do any research on that size. If I remember correctly, the JPEG 2000 uses non-orthogonal wavelets. Yeah. And that really looks like black magic. Because you are projecting the function on some other vectors which are not linearly independent. But then you can reconstruct. And actually, that's useful, I think, in Lossy Compression. Because you get some redundancy somehow. Also, there's no codec. It's a video codec. And it also uses non-orthogonal wavelets. If I like to use this in some audio compression application, there is a typical difference between... I have to get the frequencies. I get it. For example, by the ECS car function, I think. But reconstructing is... Basically, it's not for... The idea of the wavelets is to decompose in a mixed time-space domain. While with the Fourier transform, you only decompose on the frequency domain. That is, you can get the frequency, but you don't get the time. With the wavelet, you get some better hint of when it happened. Okay. So in the transform, I know about the frequencies. I can discard frequencies. I can't hear. Yes. You could do that, for example. But then... It depends on what you need to do. For example, the fact that there are no actually used audio codecs that use wavelets should be some kind of hint that perhaps they're not really the best thing out there for doing that. Myself, I try to implement a lossless audio codec using wavelets and... Oh, it doesn't work. I mean, yes. Lossless, yes. But it doesn't compress that much. No, it compresses something. But even better than the generic compressors. I mean, with the G-zip, for example, or B-zip, I get better compression ratios. But nowhere near a flag. And by nowhere, I mean like 20%, 30% worse. Still 20% better than the generic compressors. But that's actually different. I mean, lossless compression is not done with Fourier transform anyway. Lossless compression, yes. But still nobody's using it. I don't know, maybe we could start. Any more questions? No. Could be a typical application of these wavelets, except generic compression? Well, could be used. Okay. Or also filtering, in some cases, could help. If you want to filter something at some point and not always. For example, it's easier that way. Or, well, you could do weird stuff, but yeah. It's not a faster type of Fourier transformation. It's not a Fourier transformation. How do you choose the word here? Good luck with that. You have to, basically, yeah, good luck. You have to try and see what's the best thing. There's no way to just know that that kind of wavelet is better suited for something compared to something else. The only thing that I saw is that most lossy codecs use non-orthogonal wavelets. So probably if you're trying to do something lossy, probably you should be trying to do something with non-orthogonal wavelets. I mean, how do you choose between the wavelets? Yeah. And how do you choose which one to use? Is it experimentally? Basically, as far as I know, yes. I'm not a wavelet expert, actually. I'm not a great expert on wavelets. So if I say it to the best of my knowledge, it's not that much. But yeah, that's it. It's incredibly hard to find somebody who knows anything about wavelets these times. Because when I wanted to do something with wavelets in university, I tried and searched and I could find nobody at the University of Pisa, for example, that knew anything about wavelets. And actually my professor, when I asked her if I could do a project instead of doing the standard exam, she was really happy. Oh, yeah, wavelets. I know absolutely nothing about wavelets. Do it so that you can explain wavelets to us afterwards. That was what she said. And she teaches computational maths. Okay. So, yeah. Yes? When do you use full-year trends? Where are the trends of any other transformation? So, where are there the advantages and disadvantages? Well, the point of the Fourier transform is that you get to see the signal in the frequency domain so you can do things like filtering or compression that is discarding stuff and so on. Sometimes you want to know when something happens. For example, if you have an audio file or even a picture, let's say a picture, basically the same thing, you might have sharp edges at some point. And if you are doing a Fourier transform which is necessarily windowed, otherwise it's impossible to treat, then if your window is this one, weird things happen. No. Whereas with a wavelet transform, you get to represent it better. You have the starting function, for example, let's take power, and then you have fees, and then you have basically... So in this case, you would be able to represent this sharp step and it would be better with a wavelet. And with a Fourier transform. How is it really useful sometimes to talk to a support from the people? Not at all. That's just an example. As I said, I'm not really that big, big expert. It's just that I lost some months of my life researching this stuff so that perhaps it could be useful for other people as well. Because I remember how hard it was for me to find somebody, so I thought, why not? So this is... So that's basically the big advantage with wavelets, is that it's just the whole point that you have better localization in time, so if you have wavelet based, you get a better approximation of... If you're transforming, you have a perfect representation, but then if you are compressing, you're throwing stuff away, and then in that case, the Fourier transform will screw up greatly. Yes? Do you have a pattern matching frequency to make it turn at which time certain frequencies are in time? I guess you can say something like that. You're not pattern matching frequency, but this wavelet functions basically. The Fourier transform is exactly the same thing, but with a sine and cosine. Or cosine, just cosine, because you have real signals and stuff. So instead of correlating, basically the whole thing is correlating, the signal with a sine or a cosine is correlating with wavelets. And the translation of stretching wavelets. That's the mean, basically. Here is where the wavelets wing. Any more questions, curiosities or anything? You can ask anything. I have the Bible to look up stuff if it's needed or whatever. No? Okay. Well, thank you for coming.