Supervised classification of Landsat Images using the Semi-Automatic Classification Plugin for QGIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi Google in general you're watching Proteus remote sensing this is the first basic tutorial about the semi automatic classification plug-in and the classification of land color we are going to classify a Landsat 8 image in particular we are going to identify four types of land cover water will top the detection and best soil or grow vegetation the study area is ring that Marion USA that is the site of the another good dark Space Flight Center that will lead the development of the future Landsat nine so let's start the tutorial so let's start with a brief description of the link our classification steps from the definition will encourage classes to the turret of phase of the algorithm training with the creation of roy's region of interest with the photo interpretation the assessment of spectral signature super ability and the classification preview then the classification of the whole image the refinement of the classification and accuracy assessment this is the interface of the new SCP darshan six here we have the SCP doc you can install the cemetery classification plug-in from the menu managing the installed plugins here once the style you'll have this dot with all these tools this is the home of the SCP doc with this button that can open the main tools of the SCP interface here you can see the band set tool and all these tools for download pre-processing but we're going to see these later this is the main toolbar with tools for energy be composites regions of interest and classification previews and here we have the SCP menu with a list of all the tools and of course you can drag and drop the interface as you wish and you can place for instance recipe doc here beside the layers panel and after this brief introduction of the SCP interface now we are going to download the image here we have the menu so here the download products tools here we have the search parameters with the upper left and lower right coordinates we can click this button and select in the map the coordinates with a left click for the upper left and right for the lower right corner as you can see here we have the coordinates however we are going to enter here the coordinates manually so here for the upper left coordinates we set - 77 for the X 59 for the Y and for the lower right corner - 76 0.9 for the X and 38.9 for the wife so here we have entered the search coordinates now we can select the product we have all these products here in this list from Santino - to Landsat images after and modest products of course remember to enter here your login user password for these services of course free registration in order to download the products and now we are going to select landsat 8 l 8 here in this menu next we can set the range of dates we can of course select from calendar but we are going to set the dates manually so here enter 2017 for 16 in the same date here so we have not set the range of dates we could also set the maximum cloud cover percentage here and the maximum number of results of the search now we can click this button here and after a few seconds we have the product lists here this product this is the Landsat 8 image of course acquired in this date here in this table we have all the information such as path row and other useful information if we click at this product this list the preview of the image is automatically download and displayed here so we can see for instance if there are clouds in the image if we click this button here you can load this preview directly in the QGIS map so here we have the preview of course a low resolution preview here you can see the image now we can select in the download options tab we can select the bands we can download only the bands that we are going to use for the classification so here we are going to leave selected all these bands and we are going to uncheck the band 1 been 8 9 10 11 that we're not going to use in this tutorial so now we are going to download this image here in the product list if this option process images is checked the image is automatically converted to reflectance but I'm going to uncheck this now and because of this option only previewing layers as you can see the preview is loaded in gjs we are going to download only the images that are loaded in QGIS so now I can click run and now I can select the directory where I can save the Landsat bands and as you can see the download has started after a few minutes the older bands are downloaded and loaded in huge yes here as you can see all these bands which is name I can of course remove the preview that we use for the download and here we have the bands now we are going to clip the bands for our study area so that we are going to classify just a small subset of this image in the CP menu we can select the band set tab here you can see the main interface we are going to create a band set here for clipping so now I'm clicking this button to refresh the single band list here we have the list of all the Landsat bands I'm going to select all the bands except the quality assessment band that we're not going to use in this tutorial now click this button to add the bands to the band set 1 here we have the list of bands in the band set and now I'm going to the processing tools and select the clip multiple rosters tab here as you can see the selecting band set is set to 1 so that we are going to use these pens at 1 as input of course I can create other band sets using this button here as you can see I've added new empty band sets that I can use for other processes and I can click the X for closing the band set so now we're going to clip these bands at one we have also the option for the output name prefix and we can select here the clip coordinates we could of course click this button here and then in the map left for the upper left and right click through the lower right point define the coordinates for clipping here but in this case we're going to enter manually the coordinates so here I'm entering the coordinates for the upper-left adds and the upper left why then the coordinates for the lower right point the x-coordinate and the y-coordinate these coordinates are in the same projection as the images of course I could use also a vector file for clipping and here you can see the clipping region now that I've entered the coordinates tank we can run for selecting the output directory where the clip bands are saved here for instance I'm creating a new directory clip selecting this and all the clip bands will be saved in this directory here as you can see the process has finished and the clip bands are loaded into jes as you can see here all these bands with a name starting with clip here you can see the clip two bands very small subset for this tutorial and I can remove these bands that we are not going to use in this tutorial so now we are going to convert the band's to reflectance the clip bands here now we are going to select the from the SCP menu the pre-processing tool Landsat that is for the conversion of less advanced reflectance so here we can select directory containing Landsat bands with this button here I'm going to select the clip directory where we saved the encrypted Landsat bands and as you can see the path is listed here this message is red messaging forms that required the metadata file the MTL file is missing from this directory so can use this button here to select the MTL file here this txt file that is the metadata containing the required information for the conversion to reflectance of this bed this table is filled with this data here and all this information that is used for the conversion of lenses bands to reflectance also we are going to apply the dose 1 atmospheric correction a very simple image based correction we can check here this option and as you can see in this graph the does one corrections corrects the image band in comparison to old and corrected values and the surface reflectance as you can see especially for the blue and the green band so we're going to apply the dose one correction only to the blue at a green band and then uncheck this option create band set because we are going to create band set later for the classification now we click run for selecting the output directory I'm now creating a new directory reflectance here where all the converted bands are saved here and the process starts after the conversion told the converted bands are loading tjs here you can see the bands starting with the RT in the name here we have the equip bands that we can now remove now we are going to define the band set in SCP the best it is the main input image bands here the CP menu select band set now we click this button here to refresh the list of bands loaded in huge yes I select all these bands converted to reflectance that I'm going to add to the advanced one but first I'm going to click this button reset to remove the previous bands that we loaded for clipping the Landsat image so now that I've removed the dead bands I can click this button to add these bands the converted reflectance bands to the band set 1 so this will be the input for the classification here in quick wavelength settings I'm going to select the satellite here as you can see this long list of satellites I select a Landsat 8 and as you can see the center wavelength is automatically defined this is useful for the spectral signature as you can see also the wavelength unit here is defined so now that we have defined the band set we can hide these single bands and using this tool in the SP main toolbar in the RGB color composite we can select for instance 3 2 1 for creating a virtual band set that is a virtual color composite an image a color image that we can display in the QGIS map we can also change the color composite for instance 4 3 2 this is a brief scheme of the color composite which is the combination of visible colors and spectral bands if we click one of these buttons here we can adjust the stretching automatically the band set here as you can see we can display the image and we can select the color composite from this menu you can change the color composite for improving the photo interpretation so here we can see the urban area buildings the roads and vegetation here in red so now in the SCP doc we are going to select the training input tab we can create the training input file that is required for the collection of regions of interest here clicking the training input we can see this button here or creating a new training input file if we click this button we can select here name for the training input for instance training and click Save so now we can collect the roy's inside the image so for the recreation here all the rise that we are going to collect will be listed in this table here we can see the difference between macro classes and classes where the macro class is a set of linked our classes belonging to the same material so here we can see the list of classes that we are going to classify in this tutorial so we are going to create a first row for the water what water class in the SP toolbar we have this button here for drawing polygons manually and this button here for creating a polygon using region roll in algorithm so we can zoom here in this dark area this is a lake water we can use this button to display better the stretching and we click this button here you can see that the map and the NDVI value that is a spectral index is displayed in the map so we can see here that water is very low negative values now we can click with the left click create a polygon here and right click or closing the polygon so now we can save the raw polygon in the array signature list but first we need to set the macro class information water and the class information for instance lake and now we can click Save to save the right polygon in the right cygnus released so now the ROI is saved in the signatories and also the spectral signature is calculated and we can see here the information the macro class the class the class information lake and the color will be used for the classification if we click here on the macro class list we can see the first macro class water that corresponds to the first row here the lake which belongs to the macro class one water and you can see that the class ID has automatically increased by one so we can now create a new row for instance for the built-up class so we can zoom for instance here we have this urban area buildings we can click this button to create row using the written Roman algorithm we can see the NDVI value very different between urban area and vegetation in red here as you can see with these false-color composite you can see here the option in the royals that this tool display in TV is activated if we uncheck this the value is not displayed we check this again we can see the NDVI values of the pixel below the cursor so if we click here in any pixel we can see the region growing algorithm this is a scheme of the algorithm so you can see that all the pixels with a spectral distance below certain threshold are selected as a ROI so if we zoom here we can see a very small ROI we need to increase the spectral distance here so for instance 0.08 I click again and you can see the polygon is a bit larger you can use this button here to show and hide the ROI so now we can save this ROI so we need to change the macro class ad and we need to set the macro class information so for instance here we set the stop for this macro class and we'd also change the class information for instance buildings here so we can click this button here to save the ROI the write signature list here you can see the ROI polygon black in the map and their buildings ROI listed in the signature list and we can also see the macro class boost up in the macro class list so now we can create another ROI for the 3rd macro class vegetation so we can zoom for instance in this part the map here we can see the vegetation displayed in red because of the RGB color composite if we click this button here we can create a ROI using the region graph algorithm so you can see here the very large area so probably we need to we need to lower the value the spectral distance value for instance 0.05 you can see here the lower number of pixels is selected now we can decrease again 0.03 the spectral distance and we can see a smaller ROI so here we can see so we can for instance aid these ROI polygons and change the macro class code so three change the macro class information vegetation and of course change the class information the class ID was automatically increased by one when we saved the previous ROI so we change the class information here for instance trees and we can click the Save button here so the ROI and the spectral signature is listed here and also the macro class vegetation is listed here so now we can create the fourth ROI for the fourth macro class their soil or low vegetation we can see that in this area there is actually no bare soil but actually it is low vegetation you can see here the low NDVI value so we can create ROI here for instance we can see the right polygon here so now we change the macro class cd4 and the macro class information bare soil and we change also the class information so for instance low vegetation so as you can see the difference between low vegetation with a low NDVI value and high vegetation with very high NDVI value so we can click the Save button and the raw polygon is saved in the recognizer list and the macro class is saved in the macro class list so now that we have saved a few Roy's we can assess these spectral signatures here so for instance we select with a click all these Roy's that are alike tan in blue we can click this button here to display the spectral signature plot here you can see the plot of each spectral signature water built-up vegetation and bare soil we can show and hide each signature with these check box so for instance we can compare the bill top the best soil spectral signatures we can see that are very similar we can see the center line and the semi-transparent color that is the variance of the spectral signature for each band so we compare all these spectral signatures we can also assess the spectral distance using this button here so I click this button and the spectral distances we can see the combination of each pair of spectral signatures whereas at a spectral distance indices are calculated so we can see here for instance the de Castries has very similar spectral angle to the class low vegetation as you can see here this value is highlighted in red we can also display the spectral details here for rich spectral signatures we can see set of informations from wavelength and values for each band and the standard deviation of each band and of course the count of the pixels of each ROI region of interest so now that we have assessed these spectral signatures we need to create more rice for the land cover classification so for instance we can zoom here we change the RGB color composite from this menu so we can select for instance treat one natural color but we can also enter custom values for the LGB color composite for instance three four six this is very useful for highlighting urban area and bare soil you can see here the difference between these color composites now these color composites highlight spectral features of the pixels we use this tool in the SCP main interface the RGB list tool that allows to manage the RGB color composites you can see I created a few more Roy's that are saved in the training input file you can see here in the layers panel of QJ s you can see that the training input is loaded as vector in the acute GS layer panel you can see here have created more rise to change the color composite here so now we can create the classification previews but before the classification we need to change the colors of classes as we like so for instance we can change the color for delay blue click OK we can change also the color for buildings for instance red and so for all the other spectral signatures we can also change the color in the macro classlist the color of macro classes so if we use the macro class then the classification will use these colors we can change the color for the water macro class for instance blue and so on so once we have set all the colors we can go to the classification tab here we can select the classification algorithm we have here this list we can choose between minimum distance maximum likelihood and spectral angle mapping so in this case we are going to use the maximum likelihood algorithm of course please refer to the user manual for the specifications of each algorithm and now we can use this button here to activate the pointer for the classification preview we can now click in any point the map and as you can see here square is created thus if equation preview using all these spectral signatures and of course you can notice that we have used the class ID so this classification preview use the class ID if we choose the macro class ID then we are going to use the macro classes and as you can see here the colors of the macro classes are displayed we can change for instance here the size parameter of the classification preview if we click this button we are going to create a preview in the same point as you can see the preview is larger we can see here the classes the land cover classes we can use this tool to change the transparency of the pacification preview so we can see also the image below the classification and we can assess the correspondence of the pixels the classification to the image and we can decide we are satisfied with the classification results or we are going to create other ROIs here I'm going to choose the to use the class ID here you can see the difference selecting the class ID is useful for assessing each individual contribution of the spectral signatures for the classification so for instance we can decide to remove one of these spectral signatures that maybe can create classification errors so if we click here this button so we can see here the difference with another classification preview now that we have created all these Roy's and we have assessed their spectral signatures and the classification previews we can create the final land cover classification using all the spectral signatures so we can choose here to use the macro class ad the algorithm is already defined so we can click this button here run if we click this button we can choose the output file of the classification setting the classification name and we click Save and the classification process will start for the classification of the whole image here as you can see the result of the classification is loaded you jes here the classification raster with the legend we can see the colours corresponding to each class we can see here for instance we can see of course there are a lot of errors situation errors for instance we have here these pixels classified as built up we can see other possible errors of classification here so probably for better results who should collect more spectral signatures in order to remove these classification errors well done well completed our first bank our classification of identity image I'm going to write other tutorials about the use of the Scimitar light specification plug-in and other case studies please remember that you can refer to the user manual also for any comments or questions please join the Facebook group or the Google+ community also remember that you can contribute to the development of the symptom a specification plug-in and the translation of the user manuals thank you for watching [Music]
Info
Channel: Luca Congedo
Views: 91,522
Rating: 4.9148936 out of 5
Keywords: QGIS, Supervised Classification, Land Cover, Landsat
Id: fUZgYxgDjsk
Channel Id: undefined
Length: 39min 55sec (2395 seconds)
Published: Sun Feb 04 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.