Land Cover/Use Classification using the Semi-Automatic Classification Plugin for QGIS

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
(Defining classification inputs in SCP-plugin)
 
(35 intermediate revisions by one user not shown)
Line 9: Line 9:
 
* Click [[File:qgis_scp_bandset_button2.png]] {{mitem|text=SCP Working toolbar --> Settings}}
 
* Click [[File:qgis_scp_bandset_button2.png]] {{mitem|text=SCP Working toolbar --> Settings}}
  
[[File:Qgis_scp_settings|400px]]
+
[[File:Qgis_scp_setting.png|600px]]
  
 
Set the Available RAM (MB) to a value that should be half of the system RAM. For instance, if your system has 2GB of RAM, set the value to 1024MB, (4GB: 2048MB; 8GB: 4096MB; 16GB: 8192MB).
 
Set the Available RAM (MB) to a value that should be half of the system RAM. For instance, if your system has 2GB of RAM, set the value to 1024MB, (4GB: 2048MB; 8GB: 4096MB; 16GB: 8192MB).
Line 23: Line 23:
 
* In the SCP Dock click {{button|text=Band set}} [[File:qgis_scp_bandset_button.png]] or click [[File:qgis_scp_bandset_button2.png]] {{mitem|text=SCP Working toolbar --> Band set}} , use the button {{button|text=Refresh list}} [[Image:refresh list.PNG]] and the drop-down menu-bar to select the multiband reflectance file previously loaded into the QGIS canvas as input image.
 
* In the SCP Dock click {{button|text=Band set}} [[File:qgis_scp_bandset_button.png]] or click [[File:qgis_scp_bandset_button2.png]] {{mitem|text=SCP Working toolbar --> Band set}} , use the button {{button|text=Refresh list}} [[Image:refresh list.PNG]] and the drop-down menu-bar to select the multiband reflectance file previously loaded into the QGIS canvas as input image.
 
* Next, click {{button|text=Quick wavelength settings|400px}} and select '''Sentinel-2''' from the drop-down list in order to automatically set the Center wavelength for each band and the Wavelength unit.
 
* Next, click {{button|text=Quick wavelength settings|400px}} and select '''Sentinel-2''' from the drop-down list in order to automatically set the Center wavelength for each band and the Wavelength unit.
* For conversion from Digital Numbers to Reflectance we need to mu
+
* In the '''Band set definition''' enter {{typed|text=0.0001}} for all bands in the column '''Multiplicative factor''' converting from digital numbers (unsigned integer 16bit) to reflectance values (float 32 bit, data range 0 to 1).
 +
 
 
[[File:Quick_wavelength_settings.png]]
 
[[File:Quick_wavelength_settings.png]]
 +
 
* In the '''RGB list''' [[File:working_toolbar.PNG]] of the {{button|text=Working Toolbar}}, type '''3-2-1''' to display natural color composite. Also, type '''7-3-2''' or '''7-9-3''' to display false color composites. While changing the color composite; also use the buttons {{button|text=cumulative_stretch}} [[Image:Cum_stretch.PNG]] and {{button|text=std_dev_stretch}} [[Image:Stdv_stretch.PNG‎]] for better displaying the Input image (i.e. image stretching).
 
* In the '''RGB list''' [[File:working_toolbar.PNG]] of the {{button|text=Working Toolbar}}, type '''3-2-1''' to display natural color composite. Also, type '''7-3-2''' or '''7-9-3''' to display false color composites. While changing the color composite; also use the buttons {{button|text=cumulative_stretch}} [[Image:Cum_stretch.PNG]] and {{button|text=std_dev_stretch}} [[Image:Stdv_stretch.PNG‎]] for better displaying the Input image (i.e. image stretching).
* We need to define '''training input file''' in order to collect '''ROIs''' and '''spectral signatures'''.  
+
* Define a '''training input file''' in order to collect '''ROIs''' (regions of interest or training areas) and '''spectral signatures'''.  
 
* Click {{mitem|text=SCP Dock --> Training input}}, use the button {{button|text=Create a new training input}} [[Image:Training_input.PNG‎]] to create a '''training signature file''' with the extension '''.scp'''.
 
* Click {{mitem|text=SCP Dock --> Training input}}, use the button {{button|text=Create a new training input}} [[Image:Training_input.PNG‎]] to create a '''training signature file''' with the extension '''.scp'''.
 
[[File:scp_input.png|500px]]
 
[[File:scp_input.png|500px]]
  
 
=Collection of ROIs and Spectral signatures=
 
=Collection of ROIs and Spectral signatures=
 
+
ROIs (regions of interest) can be created by drawing polygons using the button {{button|text=Create a ROI polygon}} [[File:Create_polygon.PNG‎]] or by an automatic region growing algorithm using the button {{button|text=Activate ROI pointer}} [[File:ROI_pointer.PNG]]. The region growing algorithm can create more homogeneous ROIs (i.e. standard deviation of spectral signature values is lower than manually drawn ones); the manual creation of ROIs can be useful in order to account for the spectral variability of classes. Here we will use the automatic region growing algorithm.
 
+
 
+
 
+
# ROIs can be created by drawing polygons using the button {{button|text=Create a ROI polygon}} [[File:Create_polygon.PNG‎]] or by an automatic region growing algorithm using the button {{button|text=Activate ROI pointer}} [[File:ROI_pointer.PNG]]. The region growing algorithm can create more homogeneous ROIs (i.e. standard deviation of spectral signature values is low) than manually drawn ones; the manual creation of ROIs can be useful in order to account for the spectral variability of classes. We will use the automatic region growing algorithm.
+
 
# From {{mitem|text=SCP Dock --> Training Input --> ROI option}}, check the function {{button|text=Display NDVI}}.
 
# From {{mitem|text=SCP Dock --> Training Input --> ROI option}}, check the function {{button|text=Display NDVI}}.
# Next, click the button {{button|text=Activate ROI pointer}} [[File:ROI_pointer.PNG]], and notice that the cursor displays '''NDVI''' value which changes over the image pixels.
+
# Next, click the button {{button|text=Activate ROI pointer}} [[File:ROI_pointer.PNG]], and notice that the cursor displays a '''NDVI''' value which changes moving the cursor over the image pixels.
 
# Zoom-in to the points and click on a land cover/use pixel associated with the point attribute to create a ROI.
 
# Zoom-in to the points and click on a land cover/use pixel associated with the point attribute to create a ROI.
# On the {{button|text=SCP Working Toolbar}}, increase the '''Dist''' parameter [[File:Dist.PNG]] (e.g. from 0.010000 to 0.100000). Define the number of selected pixels '''Min''' as 10 and '''Max''' as 30. Click the button {{button|text=Redo the roi at the same point}} [[File:Redo.PNG]] to capture more spectrally similar pixels.
+
# On the {{button|text=SCP Working Toolbar}}, increase the '''Dist''' parameter [[File:Dist.PNG]] (e.g. from 0.010000 to 0.100000). Define the number of selected pixels for one ROI '''Min''' as 10 and '''Max''' as 30. Click the button {{button|text=Redo the roi at the same point}} [[File:Redo.PNG]] to capture more spectrally similar pixels.
# Still under {{mitem|text=SCP Dock --> Classification dock --> ROI creation}}, set '''MC_ID''', '''C_ID''', '''MC_info''' and '''C_info''' (see table of the simplified [http://wiki.awf.forst.uni-goettingen.de/wiki/index.php/Training_data_selection_(SCP)#Defining_land_use.2Fcover_classes classification scheme]), and click on the button {{button|text=Save temporary roi to training input}} [[File:Qgis_scp_save_sig.png]] to record spectral signature.
+
# Still under {{mitem|text=SCP Dock --> Classification dock --> ROI creation}}, set '''MC_ID''', '''C_ID''', '''MC_info''' and '''C_info''' (see table of the simplified [http://wiki.awf.forst.uni-goettingen.de/wiki/index.php/Training_data_selection_(SCP)#Defining_land_use.2Fcover_classes classification scheme]), and click on the button {{button|text=Save temporary roi to training input}} [[File:Qgis_scp_save_sig.png]] to a record spectral signature.
# Set custom colors for '''ROIs''' by double-clicking on a '''Color''' field from the {{button|text=ROI Signature list}}. A '''Select color''' window opens. Click first on an empty field below '''Custom colors'''. Then specify a value for '''Red''', '''Green''' and '''Blue''' using the RGB codes in the table of [http://wiki.awf.forst.uni-goettingen.de/wiki/index.php/Training_data_selection_(SCP)#Defining_land_use.2Fcover_classes classification scheme]. Click {{button|text=Add to Custom Colors}}.
+
# Set custom colors for '''ROIs''' by double-clicking on a '''Color''' field from the {{button|text=ROI Signature list}}. A '''Select color''' window opens. Click first on an empty field below '''Custom colors'''. Then specify a value for '''Red''', '''Green''' and '''Blue''' using the RGB codes in the table of [http://wiki.awf.forst.uni-goettingen.de/wiki/index.php/Training_data_selection_(SCP)#Defining_land_use.2Fcover_classes classification scheme]. Click {{button|text=Add to Custom Colors}}.  
# Repeat step 6, 7 and 8, to record ROIs and spectral signatures for all land cover / use classes.
+
[[File:Qgis_scp_color_select.png|400px]].
 
+
* Start with class '''Water''' (MC_ID = 5, C_ID = 7). Created ROIs will appear under {{button|text=ROI Signature list}} in the Creation Dock. Observe that all created ROIs have the same class information (i.e. '''MC_ID, MC_Info, C_ID and C_Info'''). Thus we need to assign the correct class to each ROI. This will be done by visual interpretation with the aid of color composites of the Sentinel-2 image (to identifiy different features), high resolution Google satellite scenes and a thematic Urban Atlas vector file. Repeat step 5 and 6 to record ca. 10 Water ROIs. Note, the Number in the C_ID field will be automatically increased and needs to be manually corrected.
 
[[File:Roi_1.png|600px]]
 
[[File:Roi_1.png|600px]]
 +
* If you made an error setting '''MC_ID''', '''C_ID''', '''MC_info''' or '''C_info''', mark the field in the ROI list and edit the field with one left-click.
 +
* If you want to delete a signature, mark a signature in the ROI list and click [[File:Qgis_scp_roi_delete.png|30px]].
 +
* When you are done, check location and correct assignment of ROIs by left double-click signatures in the ROI list zooming automatically to the extent of the corresponding ROI.
 +
* Double click on the SCP training input in the Layers Panel. In the '''Symbology''' tab set '''Fill style''' to ''No brush'' and '''Stroke color''' to a color of your choice.
 +
* Save your work: click [[File:Qgis_scp_roi_export.png|30px]] or click [[File:qgis_scp_bandset_button2.png]] {{mitem|text=SCP Working toolbar --> Basic tools  --> Export signatures}}. Save in file format *.scp and *.shp (for later use in other classification software).
  
 
=Assess Spectral Signatures=
 
=Assess Spectral Signatures=
 
Premise: Different materials may have similar spectral characteristics. Such pixels could be misclassified due to inability of classification algorithms to correctly discriminate those spectral signatures. Thus it is important to review spectral signatures of training samples and repeatedly modify them until all class training sets achieve adequate spectral separability. This can be done by 1) displaying and assessing '''spectral plots''' and/or 2) calculating the '''spectral distances''' of signatures.
 
Premise: Different materials may have similar spectral characteristics. Such pixels could be misclassified due to inability of classification algorithms to correctly discriminate those spectral signatures. Thus it is important to review spectral signatures of training samples and repeatedly modify them until all class training sets achieve adequate spectral separability. This can be done by 1) displaying and assessing '''spectral plots''' and/or 2) calculating the '''spectral distances''' of signatures.
 
+
* Load an example SCP training input file: {{typed|text=\lucc\lucc_training_input.scp}}. Click {{mitem|text=SCP Dock --> Training input}} and click {{button|text=Open a training input}}.[[File:Qgis_scp_open_training.png|30px]] to open a '''training signature file''' with the extension '''.scp'''.
# Highlight spectral signatures in the {{button|text=ROI Signature list}} and click the button {{button|text=Add highlighted signatures to spectral signature plot}} [[File:Spec_sig_plot.PNG‎]] to display signature plot.
+
* Arrange signatures in ascending order by C_ID with a left-click the Column name '''C_ID'''.
# Disable/enable plot value range by checking/unchecking {{button|text=Plot value range}}.
+
* Highlight all signatures of one C_ID in the ROI Signature list holding CTRL + left-click or Shift + left-click  on row numbers of the ROI signature list. Click [[File:Qgis_scp_merge_sig.png|30px]] {{button|text=Merge highlighted spectral signatures}} obtaining the average signature. The result is a new '''merged''' signature containing all ROIs of a class. Adjust the color field of the merged signature to the pre-defined color code.
# Observe differences between different pairs of land cover classes accross all wavelength ranges.
+
* Repeat this step for all C_ID classes.  
# Use the {{button|text=Automatic thresholds}} [[File:Auto_treshold.PNG]] field to refine signature separability. It is also possible to refine the range within the plot. In the {{button|text=Plot Signature list}}, highlight a signature, click on the button {{button|text=Change value range interactively in the plot}} [[File:Edit_range_interactive.PNG]], click inside the plot to reduce or increase range. (NB. classes are well separated if there is no overlap in at least one band)
+
* Highlight all single signatures in the ROI list and click [[File:Qgis_scp_roi_delete.png|30px]]. Keep only merged signatures in the ROI list.
# For the highlighted signatures click the button {{button|text=Calculate spectral distances}} [[File:Calc_sig_diff.PNG]]  
+
[[File:Qgis_merged_rois.png|400px]]
# Click {{button|text=Signature details}} to unfold signature statistics for each wavelength range.
+
* Highlight all merged signatures and click [[File:Qgis_scp_add_plot.png|30px]] adding highlighted signatures to spectral signature plot.
# Click {{button|text=Spectral distances}} to reveal spectral signature (dis)similarity metrics.
+
* Observe differences between different pairs of land cover classes accross all wavelength ranges in the spectral signature plot.
# To examine scatter plots for the highlighted signatures click the button {{button|text=Add highlighted items to scatter plot}} [[File:Sct_plot.PNG‎‎]] to display scatter plot.
+
[[File:Qgis_scp_signature_plot.png|600px]]
[[File:Spec_plot.png|600px]]  
+
* For the highlighted signatures click the button {{button|text=Calculate spectral distances}} [[File:Calc_sig_diff.PNG]]  
 
+
* Click {{button|text=Signature details}} to unfold signature statistics for each wavelength range.
 
+
[[File:Qgis_scp_signature_details.png|600px]]
[[File:Plot_no_value_range.png|600px]]
+
* Click {{button|text=Spectral distances}} to reveal spectral signature (dis)similarity metrics.
 
+
[[File:Qgis_scp_signature_distances.png|600px]]
 
+
* Examine scatter plots of the highlighted signatures: click [[File:Qgis_scp_add_scatter.png|30px]].
[[File:Past_AnnualCrop.png|600px]]
+
[[File:Qgis_scp_scatter_plot.png|600px]]
 
+
 
+
[[File:Sig_details.png|600px]] [[File:Spec_dist.png|600px]]
+
 
+
[[File:Scatter_plot.png|600px]]
+
  
 
= Classification =
 
= Classification =
  
 
Create some classification previews to get an overview of how the process will perform. This also helps to improve on the spectral signatures of training input for better classification results.
 
Create some classification previews to get an overview of how the process will perform. This also helps to improve on the spectral signatures of training input for better classification results.
# Click {{mitem|text=SCP Dock --> Classification dock --> Macroclasses}} to set the colours for each class.
+
# Under {{mitem|text=SCP Dock --> Classification dock --> Classification algorithm}}, check {{button|text=Use C_ID}} for classification. For the '''algorithm''', select {{button|text=Maximum Likelihood}}
# Then under {{mitem|text=SCP Dock --> Classification dock --> Classification algorithm}}, check {{button|text=Use MCID}} to use Macroclass IDs for classification. For the '''algorithm''', select {{button|text=Maximum Likelihood}} and under '''Land Cover Signature Classification''' check the box next to {{button|text=LCS}}.
+
# On the {{button|text=Working Toolbar}} click the button [[File:Preview_pointer.PNG]] to activate the classification preview pointer.
# On the {{button|text=Working Toolbar}} click the button [[File:Preview_pointer.PNG]] to activate the classificatin preview pointer.
+
# Then click a point on the image to display a classification preview in the map. Use [[File:Zoom_to_preview.PNG]] to zoom to the classification preview.
# Then click a point on the image to display a classification preview in the map. Use the button [[File:Zoom_to_preview.PNG]] to zoom to the classification preview.
+
# When satisfied with preview and training input open {{mitem|text=SCP Dock --> Classification dock --> Classification output}} and click [[File:Output_button.PNG]] to specify an output destination. Results will be displayed in QGIS canvas after the processing.
 
+
# Repeat with other algorithms (Minimum Distance and Spectral Angle) and compare results and performance.
Classification can be performed after ROI creation and definition of spectral ranges.
+
  
# When satisfied with the preview and training input, check the box next to {{button|text=Algorithm}} under '''Land Cover Signature Classification'''.
+
=Postprocessing=
# Open {{mitem|text=SCP Dock --> Classification dock --> Classification output}} and click the button [[File:Output_button.PNG]] to specify an output destination. Be patient, processing needs some time! Results will be displayed in QGIS canvas after the processing.
+
Remove raster polygons smaller than a provided threshold size (in pixels) and replace them with the pixel value of the largest neighbour polygon. It is useful if you have a large amount of small areas  pixel on the pixel-wise classification map.
# Repeat with other algorithms to compare their performance.
+
* Click [[File:qgis_scp_bandset_button2.png]] {{mitem|text=SCP Working toolbar --> Postprocessing --> }}.
 +
* Select a thematic classification output.
 +
* Specify a threshold in pixels. Only raster polygons smaller than this size will be removed. This should correspond to the Minimum Mapping Unit (MMU).
 +
* Choose 8-connnectedness
 +
* Click run and define a new output raster file.
 +
[[File:qgis_scp_post_sieve.png|400px]]
  
 
=Accuracy assessment=
 
=Accuracy assessment=

Latest revision as of 23:38, 30 June 2019

Contents

[edit] Install and set up SCP plugin

  • Click Plugins --> Manage and Install Plugins.
  • Type in the search bar Semi-Automatic Classification, click on the plugin name and then on Install plugin.

SCP plugin intall.png

  • Right-click on the QGIS main manu to open the Panels and make sure the following are checked SCP Dock, SCP Edit Toolbar, and SCP Working Toolbar.

SCP Tool.png

  • Click Qgis scp bandset button2.png SCP Working toolbar --> Settings

Qgis scp setting.png

Set the Available RAM (MB) to a value that should be half of the system RAM. For instance, if your system has 2GB of RAM, set the value to 1024MB, (4GB: 2048MB; 8GB: 4096MB; 16GB: 8192MB).

[edit] Defining classification inputs in SCP-plugin

  • Load a multiband file of Sentinel-2 product L1C and L2A stored as digital numbers in data format unsigned integer 16bit (e.g. \lucc\s2\Subset_S2A_MSIL2A_20170619T_MUL.tif) into the QGIS canvas.
  • Data source Manager --> Browser --> XYZ Tiles. Select Google Satellite as background layer.
  • Load the European Urban Atlas as background vector layer \lucc\DE021L1_GOTTINGEN\Subset-Goe_DE021L1_GOTTINGEN_UA2012_UTM32N.shp

We need to define two inputs for SCP:

    • a multiband input image to be classified and
    • a training input as vector or spectral signature file.
  • In the SCP Dock click Band set Qgis scp bandset button.png or click Qgis scp bandset button2.png SCP Working toolbar --> Band set , use the button Refresh list Refresh list.PNG and the drop-down menu-bar to select the multiband reflectance file previously loaded into the QGIS canvas as input image.
  • Next, click Quick wavelength settings and select Sentinel-2 from the drop-down list in order to automatically set the Center wavelength for each band and the Wavelength unit.
  • In the Band set definition enter 0.0001 for all bands in the column Multiplicative factor converting from digital numbers (unsigned integer 16bit) to reflectance values (float 32 bit, data range 0 to 1).

Quick wavelength settings.png

  • In the RGB list Working toolbar.PNG of the Working Toolbar, type 3-2-1 to display natural color composite. Also, type 7-3-2 or 7-9-3 to display false color composites. While changing the color composite; also use the buttons cumulative_stretch Cum stretch.PNG and std_dev_stretch Stdv stretch.PNG for better displaying the Input image (i.e. image stretching).
  • Define a training input file in order to collect ROIs (regions of interest or training areas) and spectral signatures.
  • Click SCP Dock --> Training input, use the button Create a new training input Training input.PNG to create a training signature file with the extension .scp.

Scp input.png

[edit] Collection of ROIs and Spectral signatures

ROIs (regions of interest) can be created by drawing polygons using the button Create a ROI polygon Create polygon.PNG or by an automatic region growing algorithm using the button Activate ROI pointer ROI pointer.PNG. The region growing algorithm can create more homogeneous ROIs (i.e. standard deviation of spectral signature values is lower than manually drawn ones); the manual creation of ROIs can be useful in order to account for the spectral variability of classes. Here we will use the automatic region growing algorithm.

  1. From SCP Dock --> Training Input --> ROI option, check the function Display NDVI.
  2. Next, click the button Activate ROI pointer ROI pointer.PNG, and notice that the cursor displays a NDVI value which changes moving the cursor over the image pixels.
  3. Zoom-in to the points and click on a land cover/use pixel associated with the point attribute to create a ROI.
  4. On the SCP Working Toolbar, increase the Dist parameter Dist.PNG (e.g. from 0.010000 to 0.100000). Define the number of selected pixels for one ROI Min as 10 and Max as 30. Click the button Redo the roi at the same point Redo.PNG to capture more spectrally similar pixels.
  5. Still under SCP Dock --> Classification dock --> ROI creation, set MC_ID, C_ID, MC_info and C_info (see table of the simplified classification scheme), and click on the button Save temporary roi to training input Qgis scp save sig.png to a record spectral signature.
  6. Set custom colors for ROIs by double-clicking on a Color field from the ROI Signature list. A Select color window opens. Click first on an empty field below Custom colors. Then specify a value for Red, Green and Blue using the RGB codes in the table of classification scheme. Click Add to Custom Colors.

Qgis scp color select.png.

  • Start with class Water (MC_ID = 5, C_ID = 7). Created ROIs will appear under ROI Signature list in the Creation Dock. Observe that all created ROIs have the same class information (i.e. MC_ID, MC_Info, C_ID and C_Info). Thus we need to assign the correct class to each ROI. This will be done by visual interpretation with the aid of color composites of the Sentinel-2 image (to identifiy different features), high resolution Google satellite scenes and a thematic Urban Atlas vector file. Repeat step 5 and 6 to record ca. 10 Water ROIs. Note, the Number in the C_ID field will be automatically increased and needs to be manually corrected.

Roi 1.png

  • If you made an error setting MC_ID, C_ID, MC_info or C_info, mark the field in the ROI list and edit the field with one left-click.
  • If you want to delete a signature, mark a signature in the ROI list and click Qgis scp roi delete.png.
  • When you are done, check location and correct assignment of ROIs by left double-click signatures in the ROI list zooming automatically to the extent of the corresponding ROI.
  • Double click on the SCP training input in the Layers Panel. In the Symbology tab set Fill style to No brush and Stroke color to a color of your choice.
  • Save your work: click Qgis scp roi export.png or click Qgis scp bandset button2.png SCP Working toolbar --> Basic tools --> Export signatures. Save in file format *.scp and *.shp (for later use in other classification software).

[edit] Assess Spectral Signatures

Premise: Different materials may have similar spectral characteristics. Such pixels could be misclassified due to inability of classification algorithms to correctly discriminate those spectral signatures. Thus it is important to review spectral signatures of training samples and repeatedly modify them until all class training sets achieve adequate spectral separability. This can be done by 1) displaying and assessing spectral plots and/or 2) calculating the spectral distances of signatures.

  • Load an example SCP training input file: \lucc\lucc_training_input.scp. Click SCP Dock --> Training input and click Open a training input.Qgis scp open training.png to open a training signature file with the extension .scp.
  • Arrange signatures in ascending order by C_ID with a left-click the Column name C_ID.
  • Highlight all signatures of one C_ID in the ROI Signature list holding CTRL + left-click or Shift + left-click on row numbers of the ROI signature list. Click Qgis scp merge sig.png Merge highlighted spectral signatures obtaining the average signature. The result is a new merged signature containing all ROIs of a class. Adjust the color field of the merged signature to the pre-defined color code.
  • Repeat this step for all C_ID classes.
  • Highlight all single signatures in the ROI list and click Qgis scp roi delete.png. Keep only merged signatures in the ROI list.

Qgis merged rois.png

  • Highlight all merged signatures and click Qgis scp add plot.png adding highlighted signatures to spectral signature plot.
  • Observe differences between different pairs of land cover classes accross all wavelength ranges in the spectral signature plot.

Qgis scp signature plot.png

  • For the highlighted signatures click the button Calculate spectral distances Calc sig diff.PNG
  • Click Signature details to unfold signature statistics for each wavelength range.

Qgis scp signature details.png

  • Click Spectral distances to reveal spectral signature (dis)similarity metrics.

Qgis scp signature distances.png

  • Examine scatter plots of the highlighted signatures: click Qgis scp add scatter.png.

Qgis scp scatter plot.png

[edit] Classification

Create some classification previews to get an overview of how the process will perform. This also helps to improve on the spectral signatures of training input for better classification results.

  1. Under SCP Dock --> Classification dock --> Classification algorithm, check Use C_ID for classification. For the algorithm, select Maximum Likelihood
  2. On the Working Toolbar click the button Preview pointer.PNG to activate the classification preview pointer.
  3. Then click a point on the image to display a classification preview in the map. Use Zoom to preview.PNG to zoom to the classification preview.
  4. When satisfied with preview and training input open SCP Dock --> Classification dock --> Classification output and click Output button.PNG to specify an output destination. Results will be displayed in QGIS canvas after the processing.
  5. Repeat with other algorithms (Minimum Distance and Spectral Angle) and compare results and performance.

[edit] Postprocessing

Remove raster polygons smaller than a provided threshold size (in pixels) and replace them with the pixel value of the largest neighbour polygon. It is useful if you have a large amount of small areas pixel on the pixel-wise classification map.

  • Click Qgis scp bandset button2.png SCP Working toolbar --> Postprocessing -->.
  • Select a thematic classification output.
  • Specify a threshold in pixels. Only raster polygons smaller than this size will be removed. This should correspond to the Minimum Mapping Unit (MMU).
  • Choose 8-connnectedness
  • Click run and define a new output raster file.

Qgis scp post sieve.png

[edit] Accuracy assessment

This involves a comparison of the output land cover/use map from image classification with the independent reference/validation dataset. The result is an error matrix which allows for the computation of descriptive accuracy statistics for the overall classification exercise (i.e. overall accuracy) but also the accuracy of individual classes either as producer accuracy or user accuracy.

  1. Load the validation data (lucc_validation.shp) in QGIS.
  2. Open SCP --> Postprocessing --> Accuracy.
  3. Under Select classification to assess, use the button Refresh list Refresh list.PNG and the drop-down menu-bar to select the output map from image classification.
  4. Under select the reference shapefile or raster, use the button Refresh list Refresh list.PNG and the drop-down menu-bar to select the validation sample.
  5. Under Shapefile field, select C_ID and click the button Output button.PNG to save the error raster and execute the process.

Postprocessing accuracy.PNG

Classification accuracy results.PNG

Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export