2. SCP dock

The SCP dock allows for the the creation of ROIs (Regions Of Interest) and spectral signatures, and the classification of a Band set. The Training input, created with SCP, stores the ROI polygons and spectral signatures used for the land cover classification (see Tutorial 1: Your First Land Cover Classification).

ROIs are polygons used for the definition of the spectral characteristics of land cover classes. Spectral signatures of classes are calculated from the ROIs or can be imported from other sources (see Import signatures). It is worth pointing out that classification is always based on spectral signatures.

SCP allows for the creation of temporary ROI polygons using a region growing algorithm or drawn manually with the tools provided in the Working toolbar. Temporary ROI polygons can be saved in the Training input along with the spectral signatures of the ROI.

The Training input is composed of a vector part (i.e. a shapefile) and a spectral signature part which are independent. The attribute table of the vector contains four fields as in the following table.

Training input fields
Description Field name Field type
Macroclass ID MC_ID int
Macroclass Information MC_info string
Class ID C_ID int
Class Information C_info string

In SCP, land cover classes (and ROIs) are defined with a system of Classes (Class ID) and Macroclasses (Macroclass ID) (see Classes and Macroclasses) that are used for the classification process; each Macroclass ID is related to a Macroclass Information (e.g. macroclass name) and each Class ID is related to a Class Information (e.g. class name), but only Macroclass ID and Class ID are used for the classification process.

The use of the Macroclass ID or Class ID for classifications is defined with the option Use MC ID or C ID in the Algorithm. It is worth highlighting that when using Macroclass ID all the spectral signatures are evaluated separately and each pixel is classified with the corresponding MC ID (i.e. there is no combination of signatures before the classification).

The classification can be performed for the entire image ( Algorithm ) or a part of it, creating a Classification preview.

The SCP dock contains the following tabs:

The left side of SCP dock contains buttons for accessing the main functions of SCP.

2.1. Home

_images/SCP_home.jpg

Home

The tab Home contains the buttons for accessing the main functions of SCP:

2.1.1. SCP news

This section displays news about the SCP and related services. News are downloaded on startup (internet connection required). It can be enabled or disabled in the settings Dock.

It also contains the following buttons:

  • User manual: open the link to the user manual;
  • Ask a question: open the link to the online help;
  • Support the SCP: open the link to support the SCP ;

2.2. Training input

_images/roi_signature_list.jpg

Training input

This tool allows for the creation of the training input file (.scp ) required for storing ROIs and spectral signatures. The training input file is created according to the characteristics of the active band set defined in Band set. A new training input file should be created for every band set, unless the band sets have the same spectral characteristics and coordinate reference system.

  • open_file: open a training input file; ROIs and spectral signatures are loaded in ROI Signature list; the vector part of the training input is loaded in QGIS;
  • new_file: create an empty training input file (.scp); the vector part of the training input is loaded in QGIS; also a backup file is created (a file .scp.backup in the same directory as the file .scp) when the training input file is saved;
  • Training input input_text project_save: it displays the path to the training input file;

The training input is displayed in QGIS as vector file. ROIs and spectral signatures are displayed in the ROI Signature list. Macroclasses are defined in the Macroclasses.

2.2.1. ROI Signature list

The tab ROI Signature list displays the ROI polygons and spectral signatures contained in the training input file. If an item is a ROI polygon, double click the item to zoom to that ROI in the map. Items in the table can be highlighted with the mouse left click.

Changes in the ROI Signature list are applied to the file Training input only when the QGIS project is saved. ROIs can be edited, deleted and merged from this table.

ROIs and spectral signatures can be imported from other sources (see Import signatures) and exported (see Export signatures).

WARNING: In order to avoid data loss, do not edit the vector Training input using the QGIS tools. Use only the tools of SCP for managing the Training input.
  • input_table ROI Signature list:
    • S: selection checkbox; only the spectral signatures checked in this list are used for the classification process;
    • Type: type of the item:
      • R = only ROI polygon;
      • S = only spectral signature;
      • B = both ROI and spectral signature;
    • MC ID: ROI Macroclass ID [int]; it can be edited with a single click; MC Info is displayed in Macroclasses; if the ID of a spectral signature is set 0, then pixels belonging to this signature are labelled as unclassified;
    • C ID: ROI Class ID [int]; it can be edited with a single click;
    • C Info: ROI Class Information [text]; it can be edited with a single click;
    • Color: C ID color; double click to select a color for the class that is used in the classification; if the ID of a spectral signature is set 0, then pixels belonging to this signature are labelled as unclassified;
  • merge_sign: merge highlighted spectral signatures or ROIs obtaining a new signature calculated as the average of signature values for each band (covariance matrix is excluded);
  • calculate_signature: calculate spectral signatures of highlighted ROIs using the active band set in Band set;
  • delete_signature: delete highlighted ROIs and signatures;
  • sign_plot: show the ROI spectral signature in the Wykres sygnatur widmowych; spectral signature is calculated from the Band set;
  • scatter_plot : open the Wykres punktowy;
  • import_spectral_library: open the tab Import signatures;
  • export_spectral_library: open the tab Export signatures;

ROI Signature list is complementary to the Working toolbar and it allows for saving ROIs to the Training input defining classes and macroclasses. A Band set must be defined before the ROI creation, and ROI polygons must be inside the area of the Band set.

  • MC ID input_number project_save: ROI Macroclass ID [int]; the corresponding MC Info is loaded if already defined in Macroclasses;
  • MC Info input_text project_save: ROI Macroclass information [text]; style and information for macroclasses are defined in Macroclasses;
  • C ID input_number project_save: ROI Class ID [int];
  • C Info input_text project_save: ROI Class information [text];
  • undo_save_roi: delete the last saved ROI from the Training input;
  • checkbox Autosave project_save: if checked, automatically save the ROI Signature list to the Training input every time a ROI is saved;
  • checkbox Calculate sig. project_save: if checked, while saving a ROI, the spectral signature thereof is calculated (from Band set pixels under ROI polygon) and saved to Training input (calculation time depends on the band number of the active band set in Band set);
  • save_roi: save the temporary ROI to the Training input using the defined classes and macroclasses; ROI is displayed in the ROI Signature list;

2.2.2. Macroclasses

_images/macroclasses_style.jpg

Macroclasses

Macroclasses allows for the definition of Macroclass names and colors (used to display the results of Classification preview and Algorithm). According to Algorithm, classifications performed using C ID have the colors defined for classes in the ROI Signature list; classifications performed using MC ID have the colors defined in the Macroclasses.

MC IDs are automatically added to this table when a new ROI is saved to the ROI Signature list (if the MC ID is not already in the list). Settings are stored in Training input.

  • input_table Macroclasses project_save:
    • MC ID: Macroclass ID [int]; it can be edited with a single click;
    • MC Info: Macroclass Information [text]; it can be edited with a single click;
    • Color: MC ID color; double click to select a color for the class that is used in the classification;
  • add: add a new row to the table;
  • remove: delete the highlighted rows from the table;

2.2.3. ROI options

_images/roi_options.jpg

ROI options

ROI options are useful for displaying pixel values or improving the creation of ROIs.

  • checkbox Display input_list project_save: if the ROI creation pointer is active (see Working toolbar), the pixel value of selected vegetation index is displayed on the map; vegetation indices available in the combo box are:
    • NDVI (Normalized Difference Vegetation Index); NDVI requires the near-infrared and red bands;
    • EVI (Enhanced Vegetation Index); EVI requires the blue, near-infrared and red bands converted to reflectance; wavelengths must be defined in the Band set;
    • Custom; use the custom expression defined in the following line;
    • input_text project_save: set a custom expression; expression is based on the Band set; bands are defined as bandset#b + band number (e.g. bandset#b1 for the first band of the Band set); for example NDVI for a Landsat image would be ( bandset#b4 - bandset#b3 ) / ( bandset#b4 + bandset#b3 );
  • checkbox Rapid ROI b. input_number project_save: if checked, temporary ROI is created with region growing using only one Band set band (i.e.region growing is rapider); the band is defined by the Band set number; if unchecked, ROI is the result of the intersection between ROIs calculated on every band (i.e. region growing is slower, but ROI is spectrally homogeneous in every band);
  • radiobutton Auto-refresh ROI: calculate automatically a new temporary ROI while Region growing parameters in the Working toolbar are being changed;
  • radiobutton Auto-plot: calculate automatically the temporary ROI spectral signature and display it in the Wykres sygnatur widmowych (MC Info of this spectral signature is set tempo_ROI);

2.3. Classification

_images/classification_alg.jpg

Classification

This tab allows for the classification of the active band set defined in Band set.

Classification is performed using the active band set and the spectral signatures checked in ROI Signature list. Several classification options are set in this tab which affect the classification process also during the Classification preview.

In particular the following options are available:

  • Use checkbox MC ID checkbox C ID registry_save: if MC ID is checked, the classification is performed using the Macroclass ID (code MC ID of the signature); if C ID is checked, the classification is performed using the Class ID (code C ID of the signature);
  • weight_tool : open the Algorithm band weight for the definition of band weights;

2.3.1. Algorithm

This tool allows for the selection of the classification algorithm and the optiona definition of thresholds.

  • input_list project_save: available Classification Algorithms are:

  • Threshold input_number optional: it allows for the definition of a classification threshold (applied to all the spectral signatures); if Threshold is equal to 0, then thresholds Signature threshold are evaluated; in particular:
    • for Minimum Distance, pixels are unclassified if distance is greater than threshold value;
    • for Maximum Likelihood, pixels are unclassified if probability is less than threshold value (max 100);
    • for Spectral Angle Mapping, pixels are unclassified if spectral angle distance is greater than threshold value (max 90);
  • threshold_tool: open the Signature threshold for the definition of signature thresholds;

2.3.2. Land Cover Signature Classification

Land Cover Signature Classification is a classification that can be used as alternative or in combination with the Algorithm (see LCS threshold). Pixels belonging to two or more different classes (or macroclasses) are classified as Class overlap with raster value = -1000.

  • Use checkbox LCS checkbox Algorithm checkbox only overlap: if LCS is checked, the Land Cover Signature Classification is used; if Algorithm is checked, the selected Algorithm is used for unclassified pixels of the Land Cover Signature Classification; if only overlap is checked, the selected Algorithm is used only for class overlapping pixels of the Land Cover Signature Classification; unclassified pixels of the Land Cover Signature Classification are left unclassified;
  • threshold_tool: open the LCS threshold;

2.3.3. Classification output

Classification output allows for the classification of the Band set according to the parameters defined in Algorithm.

In addition, a previously saved classification style (QGIS .qml file) can be loaded and used for classification style.

Classification raster is a file .tif (a QGIS style file .qml is saved along with the classification); also other outputs can be optionally calculated. Outputs are loaded in QGIS after the calculation.

  • Load qml open_file project_save: select a .qml file overriding the colors defined for C ID or MC ID;
  • reset: reset style to default (i.e. use the colors defined for C ID or MC ID);
  • checkbox Apply mask optional: if checked, a shapefile can be selected for masking the classification output (i.e. the area outside the shapefile is not classified);
  • reset: reset the mask shapefile;
  • checkbox Create vector optional: if checked, in addition to the classification raster, a classification shapefile is saved in the same directory and with the same name as the Classification output; conversion to vector can also be performed at a later time (see Classification to vector);
  • checkbox Classification report optional: if checked, a report about the land cover classification is calculated and saved as a .csv file in the same directory and with the same name (with the suffix _report) as the Classification output; report can also be performed at a later time (see Classification report);
  • checkbox Save algorithm files optional registry_save: if checked, the Algorithm raster is saved, in addition to the classification raster, in the same directory as the Classification output; a raster for each spectral signature used as input (with the suffix _sig_MC ID_C ID) and a general algorithm raster (with the suffix _alg_raster) are created;
  • run: choose the output destination and start the image classification;