Alison's New App is now available on iOS and Android!

Study Reminders
Support
Text Version

We will email you at these times to remind you to study.
• Monday

Tuesday

Wednesday

Thursday

Friday

Saturday

Sunday

Video 1

So now let us go for special filtering which we have already discuss in theory and in this one I will keep like this. So now you are having input here what you are seeing a filter which is a low pass filter later on we will be also choosing the high pass filter. So in a inbuilt low pass filter that means highlighting the regional filters and deemphasizing suppressing local features. And when we apply this filters over this input image and then for as you can see on the right side that all kind of calculation is going on. So for pixel after pixel as cursor is also moving and what we are seeing that calculation is done so stop for example at this pixel I marked here as blue and this calculation is being done because this is a 3 by 3 filter. So around 66 pixel number 66 or the pixel which is having value 66 you know all values around that pixel are considered in this filtering and what we are seeing that everything is multiplied first by one value of one as in the this 2 dimensional matrix or in convolution filter is. And then for example the pixel is 95 multiply by will remain 95 and likewise all this filter all this pixel values are first multiplied their then sum is taken that sum kernel sum is 9 of this because
all the values here are added so this is called kernel sum and then it is divided 708 / 9 and we get value 78. And this is what we are getting value 78 here for that pixel which is now this is 78 where my cursor is. So likewise when I do for all the pixels except pixel at the boundary or at the edge. At the same time you are also seeing the changes in the image is taken place in the bottom. So if I want to you know this is the these are the digital numbers which are displayed here and this the same number are displayed here as the grey values to and here this is the filtered image of this on the left side and except for edge when we have been discussing the theoretical part in a spatial filtering I said that if your filter is of 3 / 3 then 1 line on all sides 1 pixel thick line on all sides will not be considered for any kind of filtering.So this is what has happened that all this red pixels are now the modified pixels or filtered pixels as you can see originally value as 80 now it is having 63 and here original value was 95 it is having 69. Now because let us say low pass filter and therefore the difference is among pixel where in this area the originally they were large that means they were they had you know local
variation high. So those have been suppressed using this special filter that is low pass filter and now in the resultant image what you see the variation in the pixel values have reduced and that means that the local variations have been suppressed and regional variations will be highlighted or highlighted here in this example. So what I will do I will again press I will restart and slowly we will go one again to see that when I run the filter this is what I see that now this the you know this one the pixel which is having value 80 that is calculated. But all this pixels in the surroundings have been taken into consideration and their multiplication factor in this case is all is 1 that is taken then their some mistaken divided by 9 that is the kernel sum and then you get a 63 value. So once I accept this one then you see that the value is 63 and likewise all the pixels except at the border or on the edge 1 pixel thick edge will not be considered and you get. And if want to show you the pixel border that is also there. So this is how the low pass filter works in the real image scenario as well but what the best advantage by this software by Doctor Rathore Chinmaya Rathore is that it simulates the things it shows that what kind of calculation is going on if we talk about low pass filtering. Inside a conventional or commercial digital image processing software like LiDAR or any other and we are may be other powerful software’s ER mapper or others. What kind of calculations are going on in the behind and that too for large image is all depicted here in a very simple way. So that is why I have been emphasizing that the this software should be downloaded by those who are interested in digital image processing in this course. And should learn the fundamental basics and the mathematics which is going in the back. Now what I will do I will start fresh but now I will take instead of low pass filter now I will take high pass filter and see how things changes in high pass filter.First we will discuss this convolution matrix and that is kernel and this is a again 3 / 3 in this example we have taken if we take 5/5 then 2 pixel thick line on the edges will not be considered in the filtering if we take more any odd number like 7/7 then 3 lines and so on so forth. So in this is the simplest example it cannot be less than 3/3. So we have we are taking all values on the edges of this convolution matrix are -1. Whereas the center pixel is 16 if you recall the theory part when we have discussed in earlier
lecture about a special filtering in specially high pass filter the purpose of high pass filter is to emphasize the local variations present in the image and deemphasize the regional variation just reverse of low pass filter. So that is why there is more weight for the center pixel value or center kernel and rest is deemphasizing so that is why there are minus values. Now again the same way we will learn we will run this thing step by step and see changes it takes. So for the first pixel and that is 80 the pixel value which is having 80 is now calculation is being done all this 55 multiply by -1 become -55 and likewise all this values are and done and then what you get a value 98. So this value is as a increased compared to what input value was 80 and likewise all these values are enhance. So when we take this sum of after this multiplication against for all pixels in this example for the 95 pixel the pixel which is 95 value and then divided by 8 then this we get 1, 2, 3 and likewise we start getting here. Because 1 value is positive rest are negative and therefore it is the division is 809 in the low pass filter because all values were same so division was 9 that is a kernel sum. And now this is what we are seeing in the high pass filter so as you can see that when if you just compare this in grey scale also that you do not see so many details in pixels or differentiation in
the adjacent pixels. But when it has been subjected to high pass filtering now you are seeing lot of differentiation in the pixels in the local that means adjacent pixels that was the purpose of high pass filter to high light the local variations and suppress the regional variations. In case of low pass filter the aim was just reverse that to highlight the regional variations and suppress the local variations. So this is the demonstration of high pass filter I will do it again just for completeness and slowly I will run for the first pixel and then second and then next and the condition is same that one because this is a 3/3 filter so therefore 1 pixel thick border will bethere all the time in the 3 by because if I want to calculate for this pixel which is at the top left corner then I do not the pixels which are surrounding to this one. And therefore in this special filtering and 1 pixel thick edge or border will not be considered in
the filtering calculation. So this is how in a very simple way we can understand that how low pass and high pass filtering is done on a full size image.

Video 2

Now we take another one which is ratio builder. As we have discussed in earlier discussions when we went to multi spectral analysis and then a band ratio and also we a 1 more step forward in band rationing is calculating in NDVI that is normalize difference vegetation index to see and the vegetation cover health of vegetation and other things. So first we will go in this demonstration about the simple ratio and as you know the simple ratio is just A divided B so band A is here and band B is in the bottom. In the spatial filtering exercises we were seeing the single band now here we are going in multi spectral so we are considering band and 2 bands here one hand may be infrared band A may be a band from visible part of M spectrum. So when we do this then the it is calculated and one by one again and the entire things has been done here and what we see here and divided A divided by B image as we created here. So if I want to see the value like here I take this example here what I see the 91 / 63 that willmcome 1.44 but of course it has to be rescaled. So scaling ratio to display values 0 to 55 that is the 2 multiply by and then we get a form of pixel values. So we can also see the stretch mathematics here or also so pixel borders that is again on the board here the edge issue or the 1 pixel thing issue will definitely will not come. So we again I will do it fresh divide now image has been created and so stretch math’s and this is how the calculation is done let us see once again very carefully and that pixel ratio for first pixel on the both bands band 1, band A and B and 91 and 63 that will turn out to be 1.444. Sominimum ratio is thing one maximum is this one this is stretched calculation for that pixel cornered pixel and in case of this normalization because after it has to be displayed and we can an image if you recall image an image the pixel which is the unit the value or the attribute as to be a integer value. That means the pixel value in an image as to be positive integer value and after reissuing what be the value which we are getting is 1.44 which is not the integer value it is the real or floating point value. And therefore it is in decimals therefore we have to you know multiply by 255 as shown here and then we get a display value which is 180 which is being used here. So likewise for each pixel this calculation is done and you get a ratio output of the image. So I can you know do it again here and so this one and then when I select this one it is like so whenever if I want to do the analysis for similar analysis for this pixel the same thing is here the ratio value is 1.857 then minimum ratio is over for in the overall image is 1.44 maximum in the overall image is 185 these 2 minimum and maximum are used as per this equation very simple equation that the pixel ratio minus minimum divided by here pixel maximum minus minimum
and then multiplied by 255 / 255 because we are considering 8bit scenario.
So I hope this part should be very clear that when we put a or when we create an image ratio using 2 bands in the background what kind of calculation goes against this pixel in the of image is clearly shown through this simulator image processing simulators. So it is in that way better to
first to understand see step the learning is step by step in this domain first is theory part which we have studied or discussed about then through this simulator. Now we are seeing what kind of calculation mathematics may be simple is going on and while calculating either filtering or in this case band rationing and once you have understood the theory part the simulation part now you can go for the real image band rationing and using may be commercial software’s. Now I take a sorry I take now a NDVI here instead of simple band ratio NDVI is also a type of band ratio but like in calculation it is that it band because we use a visible or near infrared channel where infrared channel therefore it is dedicated this kind of calculation band rationing
calculation is dedicated for vegetation. So that is why it is and it is normalized so it is normalized difference vegetation index because difference is we use visible channel also. So if I put these 2 bands A and B to the NDVI this is what the result I get and I can also see how the calculation is. So the same way if I put a my cursor here this is the calculation that the pixel ratio which is based on this simple formula is 87 here in the band A – 52 in the band B divided by 87+51 and that way I get the value 0.5 251799 and when I multiply by this value to normalize it then I get a value 236 which is the value of this pixel in NDVI image. So in that way when I do it for the entire image as it has already been done here then I get the health of the vegetation information. So in many ways it is just like a ratio but that is simple ratio band ratio but NDVI is little complex in that sense that to one it has to be one visible and band and one has to be the infrared band and then you do it like this. So infrared minus visible infrared plus visible whatever you get you rescale it and then you end up. Of course the same pixel ratio here is 0.251 minimum value is -0.381 maximum value is 0.3 so these values have also been used during the normalization. So that we get an integer value in our output image the pixel value and an image as to be integer and that is the one condition only inGIS a grid can have integer values as well as real values and can also have positive or negative values. But image pixel value has also has will always be a positive integer value that is why all this negative values everything has been removed through this normalization and you get output like this. Now we will see another simulation that is the image differencing means image arithmetic you can add 2 images you can divided 2 images that is band rationing you can subtract image one band from another band. So this is simple demonstration here that we will subtract from image one and we will use this image 2 and when we do it this is what we get. And then we can see in form of image or we can see in form of data we can also swap these images that image 2 will become image 1 and image 1 is 2 now when we subtract like here then we get this thing and we in terms of pixel or grey scale this is what the result is. So if we linear stretch on the image this is what the result if we go for pseudo stretch and then there will be result again and I choose say no stretch likewise. Sometimes in some analysis simple image arithmetic’s as also to be applied and therefore these tools are also supported in your digital image processing software’s. In filtering what we have seen low pass filter high pass filter now we will also see edge enhancer that enhancing the edges in the features and this is of course a high pass filter as this convolution matrix you can see here. So if I load this you know this one and run this one and see that the values are same ways are calculated then it is the this CP value is now 9 you know this 99 and then plus filter some in this case some filter some is 0 because here this is the and these values are being used and therefore I am getting value 99.
And likewise all these values are there and what end result is that things edges means that different between pixel values suppose they were difference of 2 pixel values 1 value was 75 another one was adjacent value was 77 of 2 adjacent pixels after this edge enhancement filtering high pass filtering because say local enhancer filter. So it will create more different between adjacent pixels. So example 75, 77 that difference may be now 72 and 79 or maybe 80 and this is what you are seeing and that in this input image the values are this is the edge which has been identified here
or marked here. And if I want to enhance this edge as is done in this case then the difference here see the difference now that earlier if I take this pixel this was 99 and 69. Now this value the 99 as gone to 129 and the 69 has gone to 39 and that mean there is more difference between 2 adjacent
pixel values and that means the edges has increased or enhanced that is why it is called edge enhancement filter. And so one can do that kind of analysis and real software’s not in simulator and earlier discussions I have shown you through images when they were subjected to edge enhancers we
get a very good output true for linear features extraction or identification of linear features. However one important thing I would like to bring here is that whenever one is going for of course this is a simulator so it is fine that we are having a convolution filter that is high pass filter that is 3 / 3. But in real operations when you go with the for the real image in you know powerful software’s what do you do you take rather then 3/3 convolution filter you go for 5/5 or 7 /7 in our discussion in theory part what I have shown the example of 11/11 though it will take lot of time but it will really highlight all the edges very successfully. So in edge enhancement filters a large
convolution matrix should be chosen and then one get a one other thing is that if you recall the low pass and let me show you the low pass and high pass filters. An low pass filters here all are examples from 3/ 3 convolution matrix so low pass filter what you are seeing here are having all positive value that is one in high pass filter on the edges of the 3/3 convolution filter you are having negative values and in the center weight because after all
this is weighted average. So center weight is having positive value that is 16 because in that way one can design 8 or put whatever is there. But too more the weight it will have higher the you know enhancement it will do for high pass in this example. But even we if you see carefully in edge enhancement filters though again it is a 3/3 convolution matrix a corner values have been kept 0 that means a no change is required however north southand east west here the filters we reverse in that sense that when I say north south that means I am talking about these values when I say east west then I am talking about these weights in the filter. In the image is when it is east west in the image east west is west north south so now here you see a in the first row of this convolution matrix you see the middle pixel middle cell is having -1 same here in the first column middle cell is having -1 again in the bottom -1 and -1 and if the center one is having positive value. So you can also notice a clear cut difference between low pass filter high pass convolution matrix and edge enhanced though it is a high pass filter but of a different design. Now when you are using 3/3 convolution matrix the option for designing either low pass or high pass filter especially high pass filters are very limited you can realize by now that in 3/3 convolution matrix not much (()) (30:32) is available. Whereas as you expand this instead of 3/3 it is go for 5/5 then more options would be available and you go higher and higher in the size of convolution matrix more options would also be available. So in that way we can see lot of changes they are in our image and the purpose here of showing again I am repeating that too to demonstrate and how what kind of calculation goes on when we put images either to filtering techniques a spatial filtering techniques or to band rationing or NDVI or edge enhancement all those things are there.

Video 3

Now I will very briefly I will also touch in this discussion or demonstration about a software which is commercial software. But let me make it very clear here and the purpose of using this commercial software is just to demonstrate what we have been discussing in the normal lectures or theory lectures let me say like this. The purpose here is not to promote any software especially the commercial one there is no tension at all to you know promote any software’s. But in order to demonstrate what we or in order to further understand what we have been discussing in theory classes then we need to use instead of a simulator we need to use really a powerful software to show all those things. Now what I will do here first I will take a an image which earlier also we have taken that image and then see that what happens to this image I also showed this image through a different commercial software that was Arc GIS. Now here when first time you display this image has
also happened in case of Arc GIS that it is in a different scheme. So will change this scheme and now I am getting in real RGB means is a false color composite 3 channels are there of spot satellite which was French satellite of most Moscow city was you are seeing and 3 bands and this is not enhanced at all no image processing has we perform except a false color composite has been created on this image. This is example image of Arc view software so it is a very sort of standard image if you want to do it a real you want to have a real experience then you must download an image which is available through various resources. And then you start doing this kind of processing as well now there are lot of enhancement which I can perform here and some are you know some are they are their like if I go for this just radiometry. Already the system has done on the image using different so if I see this is basically a input image in a very brief it is showing and also when I put my cursor and this showing that this is the equal percentage that mean it is stretching the image to exclude the lower and upper 2.5%. So if
you recall the histogram of a or histogram of any image. So that tail part or both tails 2.5% of the tails have been excluded in this enhancement and this is what the result is you are seeing. And this is all these are all prepared (()) (34:52) based on our input if I accept this one then I get the display otherwise I get and a next one is the left right percentage again the what it says that is stretches the images to exclude the lower 2.5 and upper 1.0 in this one it was all along on ends both tales 2.5 they are excluded. Here 2.5 and 1% and if it here this is standard deviation that is a
stretching image enhancement based on statistical technique standard deviation. So 2 + and -2 standard deviation so those have been even you know those have been used here like here the stretches that i made evenly between plus and – 1 standard deviation around the mean and the output which you are seeing here. If I go for minimum maximum basically we are
going for minimum maximum that means everything is being kept and in this example we are basically reaching to the original image. So there is a hardly any difference between he no stretch and minimum maximum but if go for
this simple linear I can make lot of changes this is Guassian stretch this is histogram equalization recall our discussion when we discuss a histogram equalization which creates the maximumcontrast in the image and it is also demonstrated here this is creating a maximum contrast because wherever the high frequency pixels where there they have been redistributed and
wherever the low frequencies were there they have been put a other play you know if you recall the histogram and that display then you know the entire dynamic range is whatever is available has been occupied. This is 3 band scenarios there will be 3 histograms for each band and then it has been done if I except this one this is what I get. Again if I go back here this is gamma filtering or gamma stretch is which applies to the image with the value of 2.2 and though manually also you adjust but the software whenever you choose and image or display an image in this window. Immediately it will calculate lot of option for you and without going for that one and this is slicing density slicing which we have not discussed so I will not tough and this is inward.
That inwards the value of that image and can be used to correct a negative image and that way it is there. So likewise you can very quickly because these are of course a commercial software and there have been made very user friendly so all kind of options very quickly you can perform these kind of adjustments. Similarly for filtering also as you can see a special filter which we have discussed and no filtering for the input image so let me bring the original image here and or little enhanced image like this one and then I choose this is my input image and these are the filters. Standard filters are there applies the standard age enhancing filters to the image and which you
see here you can have a you know other fine edges. So it has not applied is very heavy filter only edges have been highlighted then is smoothening that is the low pass filter so it is highlighting the regional things as you can realize. So when you see this one and this one completely change though input image is the same. And of course then you are also having you know directional filtering that only horizontal detects horizontal edges and here of course vertical edges. So you are having low pass filters this one you are have high pass filters this one you are having high pass edge enhancers this one and then you are having directional filters which are also some be high pass filters for horizontal thing and then you are having vertical thing. So all these things are being done very quickly without knowing that what kind of mathematics are calculations isgoing on and that is why I have been emphasizing that for better learning and understanding of any image one should definitely go for step by step first understanding the theory part then
through this simulation and finally through such very user friendly software’s and these are very well designed and very coded and that is why things are very quickly can be done here. And when we for this one there are all these options are also becomes available for again each option which are there again I will repeat and then I will close this discussion that the purpose of
showing through this commercial software is not to show the capabilities of this software. But to show how image processing can be done very easily once you understand in the background and theory part. So this brings to the end of this discussion thank you very much.