Land Cover Classification using the Semi-Automatic Classification Plugin version 7

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] foreign hi i'm luka congedo and you're watching from gis to remote sensing i'm very pleased to present you the new version 7 of the semi-automatic classification plugin for qjs this new version is the result of a long development which has new tools and in particularly the support for multi-trading so let's have a look at the new interface so this is the interface of the semi-automatic classification plugin for qgis version 7. here we have the news panel where you can access the news about the plugin new tutorials and so on this is the training input panel where we are going to store the region of interest and the spectra signatures this is the raw options panel for options about roy creation and these are buttons to the main tools of the plugin and of course there is the sap menu here where you can access all the tools of the plugin you can see here the menu the basic tools the download products i suggest to go to the settings menu processing setting and first set the available ram and the number of cpu trays in order to speed up the processes and speed up the calculation you can also access the main tools from this left menu here from this tree menu and you can access all the tools with a click and of course the main tool of the band set this is the working toolbar with the tools about the image rgb the region of interest and the classification preview [Music] so the first step is to download the sentinel 2 images so from the sap menu select download products this is the window the interface of the plugin here we can define the search parameters the coordinates but first i suggest you to set here the user and password of the required service for download in particular the sciap copernicus service for downloading sentinel 2 images so here we click this button osm to add the openstreetmap to qgis here this is the map that we can use for reference for selecting the area search area here we can zoom to the south of italy or over the city of matera and here we can set the coordinates of the search area this is the city of matera and here we can set the coordinates of the search area we can define the coordinates manually or by clicking this button here and then in the map left click to define the upper left corner and right click to define the lower right corner here you can see the coordinates the upper left and lower right longitude and latitude but here for this tutorial we can also set the coordinates manually more precisely here if we click show we can see here the defined search area then we come back to the interface now we can select the product to download here this is the list of products that sap can download we are going to select sentinel 2 images for this tutorial and then we define the range of dates for of acquisition dates in this tutorial we are going to set a precise date the 8th of july 2020 i selected this date because there is a very low cloud cover but of course you can select any other date then you click find after a few seconds we have the search result here in the product list each item is a image sentinel to image here we have two sentinel to level 2a and two level 1c images if we click on an item we can see here the preview of the image here this is the preview of the other image we're going to use the first the first item here and then we click this button to display a preview directly in the qgis map here with click as you can see a temporary file this previous has been added to qjs of course this is a low resolution image we can see here the extent of the image and for instance if there is a cloud cover then we can go to download options here we can define the bands to be downloaded in particular we are going to uncheck here band 1 then 9 and ben 10 because of the very low spatial resolution and spectral characteristics are not useful for blend cover classification so we came back here to the product list we can see here this option only if preview layers this should be checked in order to download only the images that are added to qgis map otherwise all the products in the product list will be downloaded we uncheck these options preprocess images because we are going to preprocess the images later and then we click run we click run and we select the output directory here and so the download process has started as you can see here the message bar with the download progress so we should wait until the download process has completed so here we have all the downloaded bands here you can see in the list we can remove the preview of the image because we don't need of course remove layer and okay so these are the bands we can see some of them so now we are going to clip the bands all the bands at once to our steady area here in the sap menu pre-processing clip multiple rasters here we can clip all these bands at once so here we can clip all the bands that we are defining in the band set the band set is defined here in this tool band set we click this button to refresh the list of single bands loading qjs we select them all with this button and then we click this plus button to add all the selected bands to the bandset one here you can see the list of bands in bandset 1. we can order automatically the bandsaw by name here advanced number and then we can also set the web length the center wavelength very quickly with this menu here we select sentinel 2 so now that we have defined the first band set we can come back to the tool clip multiple rasters here and then we can define the clip coordinates of course we could also use a vector file for clipping so first we are going to set the coordinate reference system of the qjs project as the same as the image here then we can use this button as we have done previously with the download products with a left click we define the upper left corner and the right click the lower right corner of the clipping coordinates so here we have the coordinates of course we can also enter manually this coordinates to be more precise in the clipping process and here this is the clipping area defined with this red rectangle now we can click run and select the output directory where we are going to save the clip advance and here you can see the clipping process running in the message bar you can see here the clipped bands with the prefix clip here that we are going to use later so now we can pre-process the data in particular we have downloaded the sentinel 2 bands so we go in the sap menu to preprocessing sentinel2 here we can see the tool we have some options here first we must select the directory containing sentinel two bands so here we select the directory of clip advanced but of course we could also select the directory for converting all the original bands after selecting the directory you can see here the list of bands we don't check these options apply this one correction because these are level 2a sentinel 2 images these are already atmospherically corrected images we also unchecked this option create bandset and use bandsat tools because it is an advanced options that we are not going to use in this tutorial and then we click run and the conversion process actually a conversion of digital number to decimal value of reflectance started here you can see the converted bands with the prefix rt here these are all the converted bands and of course we can select and remove the other original bands because we don't need them for this tutorial so now that we have downloaded and pre-processed the data we can define the band set so from the sap menu band set you can see here we have the previous bandset defined for the clipping process we can use this button to clear the previous band set so yes and now we are going to define a new band set so click here this button to refresh the list of single bands loaded in qjs here you can see the converted bands with the prefix rt we click this button to select all the bands and click the plus button to add the bands to the band set then to set the very quickly the center wavelength we select here sentinel 2 and this is the band set that will be the input for the classification now we can go to sap doc and create a training input here in this tab training input we click this button to create a new training input we select the output file for instance training this is a file with the scp extension this is a particular file which stores both the region of interest polygon and spectral signatures next we are going to the working toolbar here the rgb options allows to create very quickly a color composite so here we select 321 as you can see a virtual bandset which is a temporary file is created to see a natural color composite of the image we can also change the bands of the color composite for instance 732 you should notice that these are the numbers of the order of the bands in the band set these are not the original names of the central two bands and here we can see the first color composite with the near infrared band showing very clearly vegetation in red so now that we have created the band set and the training input we can create the region of interest with this button here we can create a polygon so left click for each vertex of the polygon here and right click to close the polygon here you can see this orange semi-transparent polygon is the temporary roy so in the scp dock we set the macro class name so for instance water and the class name in this case lake then we click this button to save the region of interest and calculate the spectral signature here as you can see the spectral signatures has been added to the roy and signature list here of course you can see here that the training input is a temporary file here so this is managed by scp so you just need to create rows using the scp dock so now we are going to create another roy over the urban area here this time we are going to use the region growing algorithm this button here with a simple left click in the map you can see here a polygon is created these are all the pixels very similar to the clicked pixel the similarity is defined with these options here in the working toolbar distance so we can change this value and we can use this button to redo the region of interest and as you can see increasing the distance value we have selected more pixels you can use this button to show and hide the region of interest so this is a temporary polygon so we can create many region of interest as we like we can see that with this value we have also selected some vegetation pixels here in red so we reduce the distance value for instance 0.05 here and redo the region of interest and as you can see less pixels are selected now we can save this roy so we change the macro class id for instance two set the macro class name the tab the class name for instance buildings and then we click save to save the region of interest in the training input as you noticed the class id is automatically increased by one every time you save a region of interest so here we see the new roy added to the orion signature list you can see here that each region of interest is grouped by macro class in a tree list you can notice the value over the cursor in the map this represents the ndvi of the pixel so of course we need to create several rows one for instance for vegetation here here we changed of course the macro class three the macrocast name vegetation in the class name and here the third roy of vegetation you can see here we are going to create a new region of interest of soil so we change the macro class for the macro class name soil and the class name for instance fields and we click save now we are created for region of interest so one important step is to assess the spectral signatures of rice so we select all this roy's and click this button to add the spectral signatures to the spectral signal plot as you can see here we have all the spectral signatures and of the region of interest that we've collected you can see here the line representing the mean value of the spectral signature and the transparent range representing the variance you can check and uncheck the single spectral signatures so this is you can see here the mean spectra signature of vegetation these are the minimum and maximum values of the spectral signatures we can assess the spectral distances between spectral signatures here with this button you can see here the pairs of spectral signatures so here you can see the spectral distances calculated with several algorithms for instance jeffrey meltuccita is very good for assessing the spectral distance between signatures if we are using the maximum likelihood algorithm spread triangle is very good for spectral angle mapping and as you can see here these two spectral signatures buildings and fields are very similar for the spectral angle as you can see highlighted in red is a very small angle so probably there will be issues in the classification we also have some plot options and we can also export the plot after the creation of several original interests we can change the color the colors that will be used in the classification raster so double click on the color we can select for instance a curve for the macro class water we can also change the color of single region of interest for classes so after we have changed the course of all the region of interest here we can perform the first classification preview so classification previews are very useful to assess the results of a classification without running the classification of the whole image so very quickly using this button here preview with a left click on the image here you can see we have created a classification preview very small raster we have performed a minimum distance classification you can see the color defined for the region of interest if we go to sap menu band processing classification here we can see here that we have performed a preview for the input bandset defined with the class id and we can change here the algorithm for instance we can perform a classification using spatter angle mapping so we can perform another preview so this time this has been performed with the spectral angle mapping algorithm we can also change the size of the preview here so 500 pixels a square of 500 pixel side as if we change the id to be used for instance the macro class id we click this button here to redo the classification preview and here as you can see you can recognize the colors of macro classes water in blue the top in red and so on after the creation of several previews if we are satisfied with the result we can perform the classification of the old image so we go here in the cp menu then processing classification we check the options here to use macro class cd and the classification algorithm in this case spread triangle mapping then we click run and select the classification output name you can see here the classification of the whole image here it is loaded in qjs you can see the symbology that reflects the macro class id colors here you can see built up classified in red vegetation classified in green water classified in blue and soil classified in yellow of course you can also recognize classification errors here for instance this soil is classified as built up you can also see the border of delay classified as built up this is because of spectral similarity between sand soil and built up areas you can see there are several classification errors in the image so so we should improve the classification by adding a new region of interest in order to reduce the errors in the image and in this process i recommend changing the color composite because with color composites we can really see different materials at the ground so for instance here with this color composite 10 3 2 we have added a short wavelength infrared band and here we can see very different colors and very different types of soil we can use these buttons here to change the stretching of the color composite so we should repeat the process of creation of roys and improve the classification so this was the first tutorial the new version 7 of the semi-automatic classification plugin for qjs of course you can read the user manual for further details and i also invite you to contribute to the translation of the user manual to your language for any comments or questions please join the facebook group thank you for watching
Info
Channel: Luca Congedo
Views: 30,250
Rating: 4.9350181 out of 5
Keywords: QGIS, Supervised Classification, Land Cover
Id: Ceyhm3DlZNY
Channel Id: undefined
Length: 25min 54sec (1554 seconds)
Published: Sun Oct 25 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.