So in the previous part, we considered only grayscale images, in which one pixel is represented just one by one value. Some pixel value between 0 and 1 for example, so some value between black and white, but how to represent color images. And in this case, there are several so-called color models, let's consider the most important of them. So, the first type of such models is so-called additive color models in which you choose three basic colors. And then, you represent each color as waited some of these three basic colors. So in this equation, you see three basic colors P1, P2 and P3, and each color is represented as a weighted sum of these basic colors. And your kind of representation is stored in three coefficients: alpha 1, alpha 2 and alpha 3. So each color in the additive color model is stored as a couple of three values, alpha 1, alpha 2 and alpha 3. So you see the well-known Q image of pixels cube, so there are three basic colors, red, green and blue here. And each point is represented as a coordinates inside these cube. So you see that in this case of color image, each pixel corresponds to three images, to three points, not to one point as it's done in grayscale images. So the most important and the most well-known color model, the additive color model is so called RGB, it's red, green and blue. So we have three basic colors, red, green and blue, and you represent each color image and this color pixel as weighted sum of these three basic colors. So in this case, you see in this image that, so you represent the input image as the sum of three images corresponding to red, green and blue. So three, so-called three channels and each channel can be represented as a grayscale image. So you see three grayscale images, it's just the grayscale images of alpha 1 coefficient, alpha 2 coefficient and alpha 3 coefficients. So, what is also important here is that we want to represent each color individual spectrum as a weighted sum of such kind of values red, green and blue. And in order to do it, we can use so-called color matching functions, so we have one wavelength which correspond to a particular color. And we try to represent this color using a weighted sum of red, green and blue components. And you see on this chart, you see three kinds of these components, like red curve, green curve and blue curve. So you see, and what is the problem of RGB representation? You see that if we consider the wavelength something between 440 and 550, you see that the red company is lower than 0. So in this case, you see that we cannot represent this particular color with RGB model if we insist that all coefficients are positive. So in this case, we can do anything with such kind of representation, and we can store them so that they can be represented by general observation. So what should be done here, and we can use different other colors models. And the most important one is so called X, Y, Z color models which was specially created to be represented as a non-negative color matching functions. So in this case, this is the formal representation for such kind of model, so you see that X, Y and Z components represented just a linear sum of R, G and B components. And the most important here is Y component, it corresponds to luminance or brightness of color image. So in this case, so this is the most simple transformation from color image to grayscale image. You can just compute this luminance, and then take a look at this luminance and so on and represented as a grayscale image. And you see it's really typical for such kind of conversions that green component is the most important one. So you see that luminance is equal to 0.2 multiplied by red component, plus 0.7 multiplied by green component and 0.07 multiplied to blue component. So you see that the green component is the most important one in terms of its representation for grayscale images. And you see also, it's very typical to divide the X, Y and Z components to their sum, in this case you obtain again, X low, Y low and Z low components. And you see that their sum is equal to 1, so we can completely remove one of the components, usually Z and just represent each color as a pair of two. values, low X and low Y. In order to restore original pixel value, for sure, we need additional the third number, and it's typical to use luminance here. So you see it's some kind of representation, and you see that for example, Y component is high, then the color of the image is practically equal to green, so you see, it's again it's typical. So speaking about color, additive color models, there are plenty of such models for example CIELAB or L*a*b is some kind of representation in which it's considered that the brightness is perceived by general observatory logarithmically. So, and in this case, if you improve the brightness in several times, then its perception is not improved in this kind of times, so it's a kind of additive perceivement. So in this case, you see some kind of equations and this color models is while you used to understand how the general observatory perceives the color. So here are some examples of such kind of representation we have, we see an input in color image, and you see three different representations. Again, three different channels coefficients for L*a*b. There are other color models which are widely used in TV, for example in Europe, its so-called YUV model and in the United States is the so-called YIQ color models. And in all these cases, you see that the values for luminance or for brightness is slightly different, for example in the YUV model the value of green pixel is not as important as the value of green pixel in YIQ model, but anyway you can convert from each model to another. So you see that you can obtain U and V components based on B and R components and you can rotate, just rotate this representation and obtain YIQ representation. So, its general, you can use any of them. So speaking about other kind of models except additive, there are so-called subtractive models which are whether used in paintings for example. So when you mix the colors and in this case, you need some kind of subtractive model, so the base three colors are cyan, magenta and yellow. It's the colors which are obtained by subtracting from white color or to red, green and blue respectively. In fact, you additionally need the fourth representation for the black color because in general it's typical when you use some kind of painting. It's typical that if you mix everything together, you don't obtain pure black color. It's typical that you obtain some kind of dirty brown, so in this representation, you need for colors cyan, magenta, yellow and black colors. And at the end of this part, I will try to speak about where important representation of color model, so-called hue-saturation-value. It's were important not for representation in TV, but for image processing because that kind of representation generally try to understand and to present the value of color, brightness and saturation. So in this case, you have three components, hue which corresponds to the color itself, then saturation, it corresponds to how deep is the color. And value, well, your brightness is just the same as luminance or something like this. But the question is slightly different, so value is just a maximum value of R, G and B components. And saturation is computed based on the maximum and minimum values. And Hue is some kind of angle, so it's values between 0 and 330 degrees. And so, here are some equations, you can easily obtain R, G and B components based on hue-saturation-value. But, what's important here is that you can, if you want to process color image, you can convert it from RGB to hue-saturation-value. Then process in some case as saturation and value, and then return back to RGB representation. So let me show you some example again, the same flower and how we can split it into three parts. So this part is Hue, it's just pure color, maximum various of color, see how it can look like. Then here is saturation, so you see that the color of the flower doesn't have high saturation, it's already low. So in this case, you see that the color of the color of the flower here is not very violent. But you see that for example, the grass in the green and in the lower part has a much higher saturation. So, you see that in this representation, it's practically equal to maximum value white and here is the value, it's just a grayscale image. So, it's typical in image processing to convert an input image to such a kind of representation. Then for example improve the values of saturation and value, and then return back to RGB and storage it.