 So, hello and welcome to this demo session, I am Siddhant Rannade. Hi, I am Megashyam, in this demo session we will be talking a bit about image processing, so an image is basically a set of pixels, so it is basically a matrix in which you have some numbers inside. So, when I talk about a black and white image, a black and white image has you know color as white, black and shades in between of black, so white is 255, black is 0 and any other number in between 0 and 255 it is a shade of grey. So, when we look at a black and white image, it is a set of pixels and in it, so it is a matrix in which the numbers are from 0 to 255. And if it is a color image that we are talking about, then instead of there being a single matrix you have three channels, so basically it is a three dimensional matrix where each channel represents, each channel stores values from 0 to 255 and you have three such channels and each channel represents one of the three colors red, green and blue. So, there are various ways of storing this, but RGB is one of the standard ways. So, each of these channels as we call them stores one of the layers and each channel has a grayscale image. So, if you have used Instagram or you know any other photo editing software, you have seen filters like blur, motion blur or sharpen image. So, these are results of convolving the image which we have with the convolution matrix. So, this is a practical use of convolution, so we will talk about how this convolution matrix goes. So, let us say we have a small image, you know a 4 cross 4 image, it looks something like this. So, this image is basically whites in between and surrounded by dark pixels and with a little gray here. And let us say we have a convolution matrix which looks like this, a 3 cross 3 convolution matrix. Now, let us say we have a convolution matrix which looks like this. Now, how do we go about applying this matrix on this? So, let us apply this matrix on say this pixel over here. So, we center the center of the matrix on this pixel. So, let us do that, I am just taking out a 3 cross 3 you know boundary across that pixel and I am placing this matrix atop of this. So, and what we do is we multiply the corresponding elements you know and add all of them together. So, what we eventually get is since these are all zeros only this will contribute, so we will get 255 order here. Now, this is the same value, but if you look at this pixel over here, so if we apply this matrix on this pixel we will get 0, I mean this is the one which will be filtered out. So, this matrix basically results in the picture or the matrix shifting a point to the left, a pixel to the left. We will show the you know the graphical representation of this shortly in a demo. And let us say you also have how do we introduce blur in the picture? You know what a blur is something like you have your camera and then you have shaky hand. So, you take an image you see that the image is a bit blurred it is not sharp. So, how do you you know give an example of how the how this blur occurs let us just take a look at it. Let us take a slightly different image from last time. So, we have except the image is same except for this particular pixel over here which is 250 and let us apply this convolution matrix on this pixel over here. So, we will multiply the corresponding elements this, this and you know. So, the sum would be you know the rest are all 0, so only these two get picked up which is 255 plus 255 which is 510, but this is out of bounds or pixel values are supposed to be from 0 to 255 only. So, why is this happening it is happening because we have not normalized this convolution matrix. So, normalizing is basically you know take the sum of all these values in between and just 1 upon sum here the sum is 1 plus you know 0, 0, 0 and 1, so it is 2. So, when you normalize this the resultant value will also be into half which is 255 which is you know in bounds. So, yeah that is basically a convolution matrix and normalization. Now, what this matrix does is it introduces a blur. We will see more of this in the demo which will happen shortly. So, you might ask why this is a blur. So, it is a blur because if you look at it carefully it is just 2 shifting matrices. So, if you had if you only had that 1 in the top left corner and 0 everywhere else. So, it in effect you would be shifting your image to the right and downwards and if you only had a 1 in the bottom right corner you would be shifting your image upwards and to the left and if you take these 2 images and you super impose them. So, you take these 2 images and you sort of take the average of the 2 values at it at it corresponding pixels. So, in effect you are mixing pixels. So, if you mix pixels it is a blur that is basically how you get a blur. So, we will see a demo of this thing happening now. So, now here we have our standard you know the chess board. Let us apply the blur which we were talking about. So, this is the blur. Now, I apply the blur a few times because the image is a huge image and you know just mixing 2 nearby pixels over here. So, let us just compare the blurred image see the blurred image with the original image. You can see that you know the edges are a bit you know away from what they are supposed to be and let us just talk about the shift also which I just said. This shifts the image by just 1 pixel as you can see I am just keep on applying the shift filters. You can see that the image is moving towards the left. So, that is the shift and there are lot of convolution things also. This is basically the identity filters does nothing because it just takes the pixel at which the convolution matrix is centered and this is a Gaussian blur you know which basically blurs the image as such another different way. So, you can see the difference between both of them. Let us load the standard test image which you know one of the standard test images it is called LENA and this convolution matrix over here it sharpens the image which is like you can see what it does exactly. So, I will just compare both of them. You can now clearly see that you know the sharp and edges are highlighted as such here. So, the image is a bit more sharp that is what when you use the camera photo editing software and as such this is a edge detection filter it does what it exactly says it detects the edges in the image. So, you can see you know the hat the hair here the hat the hair you can see the eyes also the elbow and this was a demo which we did in MATLAB you also can use many open source photo editing software we will just take an example of one of those it is called GIMP. So, we have the Koala image here. So, people you can download GIMP it is for free download GIMP load your test image whatever you want then go to filters and then go to generic and then you will have the convolution matrix there. So, yeah you can play around with this it is a 5 cross 5 convolution matrix I just want to show the blur image here or now you can see I am not normalizing this thing here ok. So, it just has one and one I am not normalizing this thing. So, you can see what happens if I do not normalize it. So, you know the pixels get added and they are walled off at 255. So, you see it is losing most of the information in the image. So, let us go back to the filters the same thing except I will normalize the filter this time, but you know the image already bad this is go back to the image this is the original image and then yeah this time I will normalize the filter convolution matrix will have the same thing except I am normalizing it this time. So, I will just put an ok so you can see the image has you know shifted a bit downwards and has a blur because it is the identity and the shifted image added together. So, yeah people you can play around with this in GIMP. So, yes people you can play around in GIMP make your own software in silab matlab yeah you can play around and I would like to see more of this discussion happening on the discussion forums. Thank you very much. Yeah, thank you.