Supervised classification with Semi-Automatic Classification Plugin for QGIS Tutorial 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi I'm Luca congedo and you're watching from Jas to remote sensing this is the second tutorial about the use of the semi automatic reciprocation plug-in or the classification of Landsat images particular we are going to use the tools of the plugin for downloading and processing the images and we are going to create a land cover classification and indentifying the following length our classes and water stop vegetation and their soil okay so the first step these tutorials to download Landsat images and the semi automatic classification plug-in as as tool for downloading Landsat images in particular you can reach this tool by clicking here the tools button and also I want to show you that you can reach the functions of the plugin from here as you can see there are a menu for all the functions of the plugin you can download lesson from here that before downloading the database it is useful to select a database directory because otherwise the database is downloaded inside the plug-in directory so if you update a plug-in the database will be deleted so we select database directory and we save it and in the user directory for example so we say Landsat devine and we click ok so now that we have set the database directory we can update the database we check to update only lands today because we are downloading a Landsat 8 image but of course you can download also the Landsat 4 5 & 7 databases and of course this will require more time and so now we click update database we click yes to this question and of course we need the internet connection and as you can see the tool is downloading the database the Landsat 8 database ok so after a few seconds depending on your internet connection speed we have downloaded the Landsat 8 database now we need to search for our image the tool allows for searching for date for cloud cover for image ID and of course we can also search the geographically using the coordinates and in this particular tutorial we are going to identify the image through a Landsat ID and but of course in another tutorials I'm going to show in more detail all the tools for downloading Landsat images so if we go to the tutorial web page we can copy and paste the last image ad that we need for this tutorial the lens that the ad is this one we can copy and paste it in the semi automatic classification plug-in here image ad and we can click find images after a few seconds the tool has found the image that we can also display in QGIS clicking here display image preview here in QGIS as you can see we have a preview of the Landsat the image of course this is a very low resolution preview but you can see for for instance if there are clouds in your area of interest so it is very useful so if this is the image that we want we can start the download but first we we need to select the bands that we need in particular we need just band from 2 to 7 so we uncheck all the other Landsat bands so now we can download the image but first we should uncheck these options click download images from list then we select the directory for a lot in the image and now we select the desktop here in QJ s you'll see the download progress of course it will require a few minutes depending on your internet connection because as you can see each Landsat 8 band is about 50 megabytes so after a few minutes you can see tools downloading all the Landsat 8 bands and with the download is finished as you can hear a sound will inform you that all there lanceolate bands have downloaded and if we open the directory as you can see I knew directories created with the same name of the Landsat ID and inside his directory you can see that there are all the Landsat 8 bands and the metadata file that is useful for processing the last image in particular for the conversion from digital number to reflectance but we are not allowing these Landsat 8 bands in tjs because we need to perform the conversion to reflectors at first so in QGIS we can remove this is the preview that we have loaded before we can remove this then we need the pre-processing tool of the plug-in here in the lancet for processing - we can select the directory where the Landsat bands were downloaded so this one which is the same name of the Landsat ID as you can see automatically the plug-in has loaded all the parameters from the metadata file and we don't need to edit these items and in particular we need to check this checkbox apply this one atmospheric correction which is a particular atmospheric correction which is an image base and now we also uncheck this checkbox create band set because I want to show you how to create a band set manually but of course if you leave this checkbox you will automatically have a band set created here but we are going to come back to this later so checking applied as well as most very Corrections click the button perform conversion then we select where to save the band's converted to reflectance here we can create a directory here for instance and click OK so the process of conversion will start and of course it can last a few minutes because we are converting the whole length of band and one by one and also applying is an atmospheric correction so again the sound of the plug-in formats that the process is completed and the fans lens that they advanced converted to surface reflectance using the dust one correction are automatically loaded in QGIS in this tutorial we are going to classify only a small subset of the density image so the next step is to clip the Landsat 8 mass and in order to keep these Landsat 8 bands for our study area we need to use a shapefile so you can download the shapefile of the study area from the website of this manual from here click and download the shapefile now we are going to extract the zip file and open the shape hiring QJ yes so now we need to open the tools the clip tool of their plug-in we go to the tool clip multiple rosters we need to click the button refresh list so we can see all the lens add a bands converted to reflectance click start all because we need to keep all the dance bands then we click we check this checkbox use shape file for clipping and we also need to click refresh list here because here we can see study area shape file and this way we are going to keep all the lands of bands using this shape file and say they creep the rosters in a new directory and we click okay so as you can hear the process of clipping has completed and all the Landsat bands are loaded in QGIS we zoom we can see that all the last eight bands flipped as these graphics creep and we can load the Landsat 8 the original Landsat 8 bands from QGIS so now we have the less advanced script for our study area and the next step is to create the band set so that the plug-in can and use these bands as input for the classification in the previous tutorial we have used a single nutria spectral raster while in this tutorial we have separate bands so in order to create advance that we click here the band set tool and we need to add all these bands to the bands of the definition so we click circle and click Add the raster to set as you can see all the bands are loaded in the advance of the definition we need to define the center wavelength here and of course if the order of the bands is wrong we could just arrange the order using these arrows so now we need to set the center wavelength for each band and we can use because these are Landsat 8 band we can use the quick wavelength settings from here and select lens a day and automatically each Center wavelength is loaded or each lens of band so now that we have defined advanced here we can see that a band set is defined as input image now we need to set the input tray up file and the input signal release file of the plug-in in the previous tutorial I have shown you how to create a new shape file you turn in shape file and a new singer to release file this tutorial I want to show you how to load a previously saved turn shape file previously created signal to this file for the traineeship file we need to load the shape file with UJS so now that we have loaded the friendship file here on CBS we can we must click this button refresh list here and select of course we have just this traineeship 5 loaded TGS and as you can see automatically all the regions of interest that are inside this friendship file we open the attribute table here we can see that the same regions of interest are loaded in the ROI list here for the signature list file we need to open the signature file XML that I saved here so if we open this we can see that all the signatures are loaded in the signature list so now we need to create the region of interest in this tutorial we are going to find for macro classes water with the macro class 81 the top with macro cassadee to vegetation with macro class a d3 and verso with the macro class 84 and later I will show you the difference between classes and macro classes and how it can be useful for the sedation process now now we are going back to QGIS and we can select the color composite of our image in the previous tutorial I have already shown how to create a color composite of a Landsat image and here as you can see as I have selected a RGB color composite wilfer raster is automatically created and loaded in CGS so this bill for raster is created for this band set this is a temporary raster so when you will close the QGIS project this will be deleted and as you can see we can select one of these RGB color company but we can also create new color composite here by writing here the expression of the color company so for instance we can create the three four six color company and press enter and here this new color composite is added to the RGB list and we can quickly switch between the color composite with the mouth wheel over this list so it is very useful for highlighting the futures in the image very quickly and in particular this color composite three four six is very useful for highlighting urban areas as you can see in urban areas with this color composite are colored purple while this color composite for 3qu is particularly useful for highlighting vegetation so switching this color composite allows for a better discrimination of materials at the ground and another plugin that could be useful in this step of creational regions of interest is the open layers plugin if you install this useful plugin you captain you could add to the QGIS project one or more of these layers high resolution layers a for instance now I'm adding the OpenStreetMap layer so it can be useful for identifying futures in the high resolution map that we can cannot identify clearly in the Landsat image so it is important to identify every material at the ground so for instance large buildings as you can see in the image or roads as you can see in this other image as you can see the color composites are very useful for discriminating these futures in the image for instance roads are not particularly visible in the RGB treat 1 while they are very visible in the RGB 4 3 2 and especially RGB 3 4 6 we can also identify small buildings and narrow roads and which as you can see the pattern is different from large buildings we can also identify a bare soil for instance this an cultivated land which in the LGBT reach one is a brown while in the LGB four three two it is particularly different from cultivated land which is red and discolor composite as you can see the RGB 4 3 2 is particularly useful for identifying crops and healthy vegetation and as you can see as I have click over the recreation tool a number is displayed over the Carson this number is representative of the NV VI which is the normalized difference vegetation index and as you can see this number is higher over vegetation and is lower over built-up areas or bare soil in so it is lower where there is no vegetation so in combination with the core composite and this value displayed over the image we can easily identify the pixel is vegetated or not and we can click and quickly create regions of interest so for instance if we see that NDVI is very low probably this is a built-up area so for instance if we click here and we create a region of interest here and we increase the range radius value a little we can click the redo button and the new region of interest is created with this new parameter if we increase the value a little more we'll click the radio button here you can see that the region of interest is becoming larger so let's say that we are satisfied with this region of interest so we select here our macro class eg this is a grassland named mainly so the macro class is vegetation and as class ad we need to set a class ID that is different from the previously saved the region regions of interest so we need to set here five and we can write here for instance grassland now we can save the region of interest you can see a new region is loaded in the right list and a new spectral signature is calculated here in the signatories we can see for instance the spectral signature of this region of interest by clicking this button here as you can see there is a very high value here which is in the near-infrared because it is an vegetation we can also compare this spectral signature with another spectral signature already loaded in the signatories for instance these other one vegetation and we can see we click here fit plot to data that there is difference in the values because these previously saved a spectral signature was calculated without the definition of the center wavelength the length of them so what we need to do is to remove these four spectral signatures already loaded because the values are not compatible with the new spectral signatures for instance if we can see their signature details we can see that values of the new spectral signature are decimal values here all lower than one while the values of the previously saved the spectral signatures are in the order of thousand so we need to remove with this pattern the spectral signatures here of course we can calculate the spectral signatures that we are removed again using this button add the signature so if we click here the process starts calculating the spectral signals of course we need to set the colors of the classes again but now if we compare the vegetation and these other vegetation special signatures we can see now that the values are compatible we can remove the two spectral signatures from here and now we can see that the spectral signatures are very similar so now we can change the color here you can sign new colors to vegetation water and so on and another useful future the plugin is that you can zoom to the region of interest by double-clicking the ROI list so for instance if we double-click the water region here we have zoomed directly to the same region of interest if we double click over here if you tap region you can zoom directly to this region of interest so now we need to create the several region of interest now we are you have only five regions but we need to create region of interest for every material at the ground and the more regions are created the better this is because the classification algorithm will identify the similarity between the spectral signatures loaded here and the spectral signatures of individual pixels here so for instance if we want to display the spectral signature of the pixel for instance a pixel here we just read click over pixel and a new spectral signature is calculated here with the macro class information pixel and the color here is orange so we can see that this particular pixel has a very low spectral signature if we click over a pixel that has a very high value of normalized difference vegetation index for instance here with the 0.72 if we right click here we can see that a new pixel is loaded in the spectral signature now maybe we should change the color in order to display it better we can see that it is very similar - the spectral signature of vegetation that we have already collected so we don't need to create a new region of interest here so we need to create more region of interest for instance for the built-up areas and so we can zoom over this area and we can see that this line is a large rod and we can switch the car company so we can see the rods better and we can create a new region of interest here so with the recreation tool and click when we see a very low NDVI value we are probably over is built-up area so we click here and as you can see a new region of interest which is following the rod is created and now we can add the region of interest to the right list so the macro pass for built-up is - you can see that we have already created some region of interest in the macro pass information here as I start typing the be built up we have the list of macro classes and that we have already and digitized so I can simply click here the top so it is a sort of algal complete which can is the the process of creation Royce I need to increase the class ad but I'm not doing it because I want to show you also how to edit a region of interest that it is already said so for instance here I write rod and I said it here so for instance if I have not set a proper class ID here I can edit the right list directly so just click over the class ID and it can increase the value so now it is correct I can do the same for the class ID in the signature list so I click here Cassidy and then I can increase the value of course I can also change the class information with a click and for instance say rod 1 and every change in the region of interest list here it is also reported in the traineeship file so now that we have created several region of interest and we can create a classification preview which is a way to assess the quality of our spectral signatures and in particular if we have identified all the materials at the ground so here we can set the classification preview sides we can say 500 this is the unit in pixels and we can click here activate preview pointer with a left-click over the image we can see the classification preview using this algorithm now we are abused the minimum distance but we are going to use the spectral angle mapping algorithm for the densification so we change the algorithm here and we can click the radio button here and as you can see a pacification preview is updated pacification previews are temporary rosters that are loaded into GIS in this group custom group and all these rosters are deleted after the QGIS project is closed so we can see for instance that we have classified quite correctly the vegetation but you can see that we have classified as built-up also this area here which is probably not built up because it is quite dark it is a an area shadow so we need to create a region of interest over here and we can set for instance as vegetation macro class and we can set here trees in shadow and we can say the region of interest and calculate the spectral signature here now we change the color again and we can redo the classification preview it is important that the creation of rise and equation spectral signatures is a iterative process so after the creation of region of interest it is important to evaluate the results creating a classification reading so we click the radio button here as you can see the area was prisoned classified as built-up is now classified as vegetation and if we if we move over the image we can create other classification previews and see if the image is correctly classified now I have classified the image preview using the spectral angle mapping and using the class ad this is because I have not checked these checkbox use macro class ad if I check this checkbox I'm going to classify the image using the spectral signals here but the classification results will be classified as macro classes so if I click redo as you can see the colors here are as you can see in the layers the new classification is classified with only with macro classes and although the spectral signatures are the same we can see that there's all are different if we switch between the classification preview using macro class II and the classification preview using classes we can see that for instance the built-up area is classified as built up here while in this classification we have difference between buildings and roads so here you can see that several pixels are classified as water because I have erroneously a set macro class ID 1 which is the macro class for water so now what I need to do is to add it here the macro cassadee and set the vegetation macro Cassady which is 3 and the same for the spectral signatures and click review and now we can see that the pixels are correctly classified this is to show you that you can easily change the macro class ID and information for ROI so for signatures directly in the region of interest list and spectral signature list and now we can compare the preview results for instance with the high-resolution data and previously loaded our OpenStreetMap here so using this button show and hide we can quickly identify if we have classified correctly or bulerías or vegetation and we can also see how each spectral signature affects the classification results for instance if we enable or disable spectral signature here for instance we can disable the spectral signature of the top or the rods we can click the redo button here you can see that the classification is different for instance if we also check their soil you can see that all the pixels classified as bare soil are now classified as vegetation and of course now we are going to check all the spectral signals here and perform another preview and so let's say that we are satisfied with the densification preview now we can create our classification for the entire image so we click here the button perform classification to select a directory and we can create a new raster and we click Save and after a few seconds as you can hear that sounds in formats that the classification for the whole image is completed again we can check the results with our high resolution data and see there are areas that are not classified correctly so well done we have completed our second tutorial of course we need a several region of interest for accurate length cover classification well that's all for this edition if you have any questions or comments please join the Facebook group of the Google+ community of the semi automatic classification plug-in for QJ s thank you for watching you
Info
Channel: From GIS to Remote Sensing
Views: 47,033
Rating: undefined out of 5
Keywords: QGIS, Supervised Classification, Land Cover
Id: ImbYhiIgl1g
Channel Id: undefined
Length: 40min 37sec (2437 seconds)
Published: Sun Jul 05 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.