4. SCP dock¶
The SCP dock allows for the definition of inputs, the creation of ROIs (Regions Of Interest) and spectral signatures, and the classification of an input image.
The Input image, to be classified, can be a multi-band raster or a set of single bands defined in the Band set.
The Training input, created with SCP, stores the ROI polygons and spectral signatures used for the land cover classification of the Input image.
ROIs are polygons used for the definition of the spectral characteristics of land cover classes. SCP allows for the creation of temporary ROI polygons using a region growing algorithm or drawn manually. Using the region growing algorithm the image is segmented around a pixel seed including spectrally homogeneous pixels. Temporary ROI polygons can be saved in the Training input along with the spectral signatures of the ROI. It is worth pointing out that classification is always based on spectral signatures.
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.
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 |
Spectral signatures of classes are calculated from the ROIs and saved in the Training input. In addition, spectral signatures can be imported from other sources (see Import signatures).
The use of the Macroclass ID or Class ID for classifications is defined with the option Use MC ID or C ID in the Classification 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 ( Classification output ) or a part of it, creating a Classification preview.
The functions are described in detail in the following paragraphs, using these conventions:
= Configuration stored in the active project of QGIS
= Configuration stored in QGIS registry
4.1. SCP input¶

SCP input
4.1.1. Input image¶
This section allows for the selection of the image to be classified. Raster files must be already loaded in QGIS.
Input image can be a multi-band raster or a set of single bands defined in the Band set. If a multi-band raster is selected, raster bands are listed in the Band set.
4.1.2. Training input¶
The training input is a file .scp
created in SCP (i.e. a zip file containing a shapefile and an xml file) used for storing ROIs and spectral signatures.
Warning: Signature list files saved with previous versions of SCP are not compatible with SPC 5; however you can import a ROI shapefile using the tool Import shapefile.
ROIs and spectral signatures are displayed in the ROI Signature list. ROIs and spectral signatures can be imported from other sources (see Import signatures) and exported (see Export signatures). ROIs are displayed in QGIS as vector file (in order to prevent data loss, you should not edit this layer using QGIS functions).
: 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;
: 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
: it displays the path to the training input file;
: open the Download images;
: open the Tools;
: open the Preprocessing;
: open the Postprocessing;
: open the Band calc;
: open the Settings;
: open the online user manual in a web browser;
: open the Online help in a web browser; also, a Facebook group and a Google+ Community are available for sharing information and asking for help about SCP;
4.1.3. 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.
4.2. Classification dock¶
The Classification dock is designed to manage the spectral signatures, and classify the Input image.
4.2.1. ROI Signature list¶

ROI Signature list
The ROI Signature list displays the ROI polygons and spectral signatures contained in the Training input. 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.
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.
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;
: delete highlighted ROIs and signatures;
: 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 spectral signatures of highlighted ROIs;
: show the ROI spectral signature in the Spectral Signature Plot; spectral signature is calculated from the Input image;
: open the Scatter Plot;
: open the tab Export signatures;
: open the tab Import signatures;
4.2.2. ROI creation¶

ROI creation
ROI creation 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
: ROI Macroclass ID [int]; the corresponding MC Info is loaded if already defined in Macroclasses;
- MC Info
: ROI Macroclass information [text]; style and information for macroclasses are defined in Macroclasses;
- C ID
: ROI Class ID [int];
- C Info
: ROI Class information [text];
: delete the last saved ROI from the Training input;
Calculate sig.
: if checked, while saving a ROI, the spectral signature thereof is calculated (from Input image pixels under ROI polygon) and saved to Training input (calculation time depends on the band number of Input image);
: save the temporary ROI to the Training input using the defined classes and macroclasses; ROI is displayed in the ROI Signature list;
Display
: 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 Expression;
- Expression
: 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
); Rapid ROI band
: if checked, temporary ROI is created with region growing using only one Input image 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);
Automatic refresh ROI: calculate automatically a new temporary ROI while Region growing parameters in the Working toolbar are being changed;
Automatic plot: calculate automatically the temporary ROI spectral signature and display it in the Spectral Signature Plot (
MC Info
of this spectral signature is settempo_ROI
);
4.2.3. Macroclasses¶

Macroclasses
Macroclasses allows for the definition of Macroclass names and colors (used to display the results of Classification preview and Classification output). According to Classification 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.
4.2.3.1. Classification style¶
In addition, a previously saved classification style (QGIS .qml file) can be loaded and used for classification style.
4.2.4. Classification algorithm¶

Classification algorithm
The Classification algorithm includes several functions for the classification process used also during the Classification preview.
- Use
MC ID
C ID
: 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);
: open the Algorithm band weight for the definition of band weights;
4.2.4.1. Algorithm¶
Classification is performed using the selected algorithm.
: available Classification Algorithms are:
- Threshold
: it allows for the definition of a classification threshold (applied to all the spectral signatures); for advanced settings see Signature threshold; if threshold is equal to 0, then no threshold is considered and all image pixels are classified; otherwise:
- 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
: open the Signature threshold for the definition of signature thresholds;
4.2.4.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
LCS
Algorithm
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;
: open the LCS threshold;
4.2.5. Classification output¶

Classification output
Classification output allows for the classification of the Input image according to the parameters defined in Classification algorithm.
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.
Apply mask
: if checked, a shapefile can be selected for masking the classification output (i.e. the area outside the shapefile is not classified);
: reset the mask shapefile;
Create vector
: 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);
Classification report
: 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);Save algorithm files
: 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;: choose the output destination and start the image classification;