‫The input to our network when we are doing image recognition is an image.
‫Now the image can be either black and white, which is also known as grayscale image, or it can be
‫coloured in a grayscale image.
‫Each pixel contains only one information and the information is how wide is that pixel?
‫So usually it is seen on a scale of zero to 255.
‫255 means completely white.
‫Zero means completely black.
‫And any value in between zero and 255 is a shade of grey.
‫But in a colored image, each pixel has three values instead of one.
‫These three are R, G and B that is red, green and blue.
‫It turns out that receptors in human eye perceive color as the combination of these three colors only.
‫These are called primary colors.
‫If you mixed these three in different quantities, you will get different colors.
‫So each pixel has three values value for each of these primary color.
‫That is from zero to 255.
‫And depending on what combination of these three values do we have, we can see the corresponding color
‫and the pixel.
‫So if all three values are 255, we get white color.
‫If red and green are 255 and blue is 0.
‫We get yellow.
‫Here in this animation, you can see that when all three colors overlap, we get white collar.
‫When red and green overlap, we get yellow.
‫When blue and green overlap, we get to cian and so on. Here
‫I have also mentioned one example if you want to create purple color here are the values of our
‫RG and B setting these values will give you purple color.
‫So if each pixel has three values, we can say that the entire image is made up of three layers, one
‫layer made up of red color values called the red channel one layer made up green color values called
‫green channel, and one layer made up of blue color values called the Blue Channel.
‫So you need to remember that whenever we work with a grayscale dataset such as fashion amnest you
‫have only one channel.
‫But whenever we work on colored image, we need to take into account the three color channels
‫Also.
‫To demonstrate to you a color image is made of three channels.
‫I have created pixels using cells of Excel worksheet
‫continued that this pixel is a bundle of these three cells.
‫So the first pixel is bundle of three cells.
‫One cell to take red value, one will take green and one will be blue value.
‫And together they make one pixel
‫The value in these cells correspond to R, G and B values.
‫And we have used conditional formatting to color these cells depending on their value.
‫So if you look at this cell, this cell has value 231.
‫So it is giving us a bright green color.
‫The cell to the right of this has only 47 value.
‫Which is why it is dark.
‫So if it is zero, it will be completely black.
‫If it is 255, it would be bright green.
‫And anything in between is a gray scale of green color.
‫It similarly works with Red and Blue Channel
‫Also.
‫Now, if we are looking at individual pixels.
‫We cannot make out the image, but when we start zooming out.
‫Do you start seeing the image?
‫Do you see a normal colored image of the mario?
‫Isn't this somewhat magical?
‫We were able to create a colored image using only three colors.
‫You can see on the borders other than the mario, you can see white color, although there were only
‫red, green and blue colors.
‫This is because our eyes perceive combination of these three colors as white.
‫This is how our computer and mobile phone screens also wor for each point or pixel on the screen.
‫There are three small light bulbs, one for each red, green and blue color.
‫And with these three channels only, we see so many beautifully colored images on our screens.
‫I would like to mention here.
‫This Web site, which are used for creating this Excel image.
‫think-maths.co.uk
‫You can just upload any image here and it creates this
‫RGB Pixilated Excel file for it
‫It is an amazing and fun tool.
‫Do check it out.