Welcome back, in this segment we will introduce a two dimensional complex exponential signal. It's the extension of the one dimensional complex exponential. It is of course nothing else, than a cosine for a real part and the sine for its imaginary part. Complex exponentials are probably the most important signals in signal processing. They go through LSI's systems with their frequencies unchanged, and they're the building blocks of any signal, as we'll see in week three. The periodicity property also is responsible in determining what constitutes low and high frequencies in the normalized frequency spectrum of a digital signal. The two dimensional cosine also an important signal since evaluated at various frequencies it forms. The set of bases over transformation. The discrete cosine transfer or DCT which is widely used in image and video compression as we will see in detail in weeks nine and ten. The basic idea when the DCT is used for compression is that it de-correlates the data. Each of the DCT coefficients contains information that none of the other coefficient contain. Now, some of the coefficients contain a lot of information. Or as we say, the image of the signal is compacted in a few coefficients. While other coefficients contain very little information. And therefore, they can be discarded or coursely quantized without much loss of information. So, let us look at the specific details of the complex exponential. >> Complex exponentials are very important signals in digital signal processing. Here we see the two dimensional complex exponential at frequencies omega one, omega two. They're important for at least two reasons. The first one is that they're Eigen functions of linear and spatial invariant systems. Don't worry about the details, the fine details at this point, we'll talk about it later. But what this means is that if I have an LSI system, that's a system that is both linear and spatially invariant, and put at the input, at its input a complex exponential like this one, j omega 1 n1 plus j omega 2 n2. Then the same complex exponential will appear as the output of the system. So this complex exponential simply go through this linear and special invariant systems. With a possible change of the amplitude, that will become let's say a, and the possible addition of a phase. With phase shift. And the second important property is that this complex exponentials are the building blocks of any signal. As you'll see later I can write any signal as a weighted sum of this complex exponentials. Now, another form to describe this complex exponentials is with this formula attributed to Euler. [SOUND] So into the j omega 1 n 1, into the j omega 2 n 2 is the polar representation of this complex signal and this is equal to cosine of the argument plus j sign of the argument and does the Cartesian representation of the complex function the real part and the marginal part. It should be clear looking at either of the polar of the Cartesian presentation that the magnitude of this complex exponential, each one of them actually is, equal to 1. Right from the Cartesian is cosine squared plus sine squared and that's equal to 1. The first question we want to address here, the first property we want to examine, examine is the periodicity [SOUND] of this complex exponential with respect to the frequency, omega-1, omega-2. As it's straightforward to see here. These complex exponentials are periodic with respect to frequency with period 2pi in both directions, 2pi in the omega one direction and 2pi in the omega two direction. So, if we simply write e to the j omega 1 plus 2pi, [SOUND] n1 and the j omega 2 plus 2 pi n2, then this is clearly equal to, I just break it down to this 1. Right? And if I look at this guy here, it's a cosine plus sine, cosine 2pi n1, n1 is an integer. So, it's a cosine of an integer multiple of 2pi, which is equal to 1. And the sine of integer multiple of 2pi is 0. Therefore, this is equal to 1, and so is this. And this is equal to [SOUND]. To this, alright? So this is just the, the proof, if you wish, that indeed, the two-dimensional complex exponential is periodic with respect to frequency, with period 2pi in both the actions. This same property, actually everything I just mentioned in this slide with respect to the two-dimensional complex exponential holds true for the one-dimensional complex exponential or the three-dimensional, multi-dimensional in general complex exponential. Let us look now at the periodicity of this two-dimensional complex exponential with respect to the spatial coordinates, n1 and n2. So the question is, is the complex exponential always periodic with respect to n1 and n2. So if it were periodic, [SOUND] with periods, N1, N2, then this equality should hold true. Whenever n1, if we substitute n1 plus capital N1, and whenever n2, if we substitute n2 plus capital N2, and if it were periodic, this should be equal to E to the J omega1, N1, E to the J omega2, N2. Right? So the questions other words is, to, can I always find the capital N1, capital N2, so this equality holds true. Well let's see. If we just expand this, [SOUND] or break it down to its components. I have this for the first exponential, it's the j omega 2 and 2 times to the j omega 2 n 2. And this is equal to this. [SOUND] Now this cancel out with, cancels out with this, and this one cancels out with this. Therefore, what I'm left with is, that this should hold true. [SOUND] [SOUND] And from this I should have that omega 1, n 1 as an integer multiple of 2 pi. And that omega 2, n2 should be an integer multiple of pi with another integer here, right? So therefore from here, capital N1 is equal to k1 2pi over Omega 1 while capital N2 is should be equal to k 2pi over omega 2. Clearly n1 is an integer, k1 is an integer, therefore for this equality to hold true, 2 pi over omega 1 should be a rational [SOUND] number. [SOUND] That is the ratio of two integers, p over q. Right? [SOUND] And the same should hold true for this one so this should also be a rational number p over q, right? So this is what the analysis tells us, right? As long as 2pi over omega 1 and 2 pi over omega 2 are rational numbers, then I can always find a N1 and a N2 so that the two-dimensional complex exponential is periodic with respect to N1, N2. Right? So that's what we should keep in mind. So just for, and one dimensional or let's say a two dimensional thing I have e to the j 3 n1 times e to the j 4 n2, then here's omega 1 is right from here omega 1 equals 3. Omega 2 equals 4 and therefore 2 pi over omega 1 equals 2 pi over 3, therefore, which is not a rational number. And the same is true for 2pi o, over omega 2. Therefore, this two dimensional complex exponential is not periodic with respect to n1 and 2. And this analysis here again, calls through for one dimensional discrete complex exponential signals. Three-dimensional, four-dimensional, multi-dimensional complex exponents in general. So, in summary, what we have seen in the last two slides is that unlike the continuous time complex exponential which are always periodic in the time or spatial domain and not periodic in the frequency domain. The discrete time complex exponentials are periodic in the frequency domain and may or may not be periodic in the spatial or time domain as we just saw right here. To illustrate the previous 2 properties of a discrete cosine we show here an 1 dimensional cosine function cosine omega n for values, values of a frequency omega. Now, omega, in all cases, involves pi therefore, this cosine is periodic in the time domain. Time is the horizontal axis. So discrete time, m, right? So, for example, here, for omega equals pi over 8, the period is 2pi over omega, which is equal to 16. The period here is equal to 8, equal to 4, equal to 2 and so on. So the period keeps decreasing as you move to the right, therefore the frequency keeps increasing. So for omega equals 0. Cosine of 0 is equal to 1. This is the signal that does not have any other frequency other than the 0 frequency, the busy signal where omega equals pi over 8 we that the frequency increases. We see, right from here to here, is one period of the signal. 5 over 4 keep increasing and omega equals pi this is the highest possible frequency of the discrete cosine. And as a matter of fact cosine pi m equals to minus 1 to the n. So the values of the signal keep alternating. It switches from 1 to minus 1 and back to 1 and so on. So this is the highest possible variation of the signal. Now as the frequency keeps incre, increasing from omega plus pi to 2 pi, right? We see that the frequency of the variation of the cosine keeps decreasing. As a matter of fact this and this signal is identical, because 3 pi over 2, plus pi over 2, equals 2 pi. So these are two complementary angles and cosine of pi over 2 equals cosine of 2 pi minus pi over 2 which equals 3 pi over 2, right? So generally I have cosine a equals cosine of 2 pi minus a. Alright? And similarly, these two are the same signals and these two are the same signals. So the, this particular discrete cosine is periodic the time domain because we chose the frequency omega carefully. And then the other properties that this discrete cosine is periodic in the frequency domain with, with its, with frequency periodic with period 2pi. And therefore the range of frequencies that this cosine can change are from zero to pi. Zero is the, the lowest frequency pi is the highest frequency, I move to two pi, keep decreasing the frequency, and then omega equals 2 pi, cosine of 2 pi is also equal to 1. This is the constant signal equals the cosine at zero here. I've completed the full a full period that way in the frequency domain. Similarly to the previous slide, we show here the values of the three-dimensional cosine, cosine omega1 and 1 plus omega2 and 2, for various values of the frequencies omega1 and omega2. So we can see that the frequency's 0 pi over 8, pi over 4, pi over 2 and pi. And since pi is involved, the resulting cosine is periodic in the spatial domain. Instead of showing it as a 3D plot, we show this cosine as a two dimensional gray scale image where white corresponds to the value one, black to the value minus 1 and grey to the value 0. The axis are, should have this orientation shown here and each of these blocks is an eight by eight block. Okay? So if we look at this image for example, then, this shows cosine 0 and 1 plus 0 and 2, so cosine 0 is 1, so this a constant D merged with the value of 1. If we look at the first row here of images, then they all have omega one zero, [SOUND] so therefore they show cosine omega two n two for various values of omega two. If I look, for example at this image here, then, this is an image of cosine pi over 2 and 2, right? For this particular round the, the period is 2 pi over pi over 2 equals 4 pixels or 4 samples. Right? So if I take one line of this image. And see how it looks. Then, we see that there's a value of one, followed by value of zero, followed by the value of minus 1, followed by the value of zero. So this is one period of the cosine pi over 2 n 2. And since this cosine is independent of the value of n1 it means that for all n1s the same value of this cosine will be through therefore you see this vertical stripes right? It's the one pixel white so all these values for example here are equal to 1. And if I look also at this cosine, this represents cosine pi n2, which is, which as we saw, is equal to minus one to the n2, so this is the highest cosine in the n2 direction. I have one and minus one out of [UNKNOWN]. And if I finally look at this cosine here, this is cosine pi n1 plus pi n2. And you can easily verify that this is equal to minus 1 to the n1, minus1 to the n2. So clearly the pixels ultimate between minus 1 and 1, and this is the highest two-dimensional cosine that uh,we can have. We are going to encounter these images later on in the course going to talk about compression. This will be the basis function signals of the discrete cosine drafts form which we will use to correlate data in JPG as well as in media compression.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000