Semi-Automatic Classification Plugin v.3.0 "Rome" released


First version of the plugin
A little over a year ago, I released the first version of the Semi-Automatic Classification Plugin (SCP) for QGIS 1.8, which allowed for the creation of ROIs (Regions of Interest) with a region growing algorithm and the supervised classification of remote sensing images.

The first release had an essential interface that was quite effective for the classification purpose. Also, it relied on several other programs for the ROI collection and the classification process.
In the following months I released several plugin updates, adding new features and changing the interface accordingly.

Today I am glad to announce the release of the new Semi-Automatic Classification Plugin version 3.0 code name "Rome" (the city where the plugin was created) which is the result of a long work and brings several new features and improvements.

The major changes are:
  • Reduced dependencies to only: GDAL, OGR, Python Numpy, Python SciPy, and Python Matplotlib;
  • Several code improvements and updated interface;
  • Classifications are performed using spectral signatures that can be imported from external libraries such as USGS spectral libraries and ASTER spectral libraries;
  • Classification previews are faster.

Semi-Automatic Classification Plugin v. 3.0 Rome for QGIS


The main results of this version are: a really simpler installation of the plugin an all supported operating systems, the rapider classification of multiband raster images (because images are not split to single bands anymore before classification, thus there is no time difference in the classification of single band rasters or multiband raster), and classification previews are performed in only a few seconds (depending on its size), facilitating the selection process of spectral signatures (ROIs).
The SCP toolbar
A new toolbar allows for the selection of the input image, and includes several buttons for the main functions. 

Another main achievement of this version resides in the classification perspective. In fact, previous versions where focused exclusively on ROIs, which are the training areas for the classification algorithms; thus, the spectral signatures were only calculated from collected ROIs, which were the actual classification input.
Now, the main focus is on spectral signatures, which are the classification input. Spectral signatures can be generated from ROIs as in the previous versions (and in the same way, so that for users there is little difference in the classification process), but now spectral signatures can also be imported from spectral libraries, and exported to xml and csv files.
In particular, a button allows for the direct selection and download of USGS spectral libraries (from the USGS website http://speclab.cr.usgs.gov/spectral-lib.html).

The SCP importer of USGS spectral libraries

Another button allows for the importation of ASTER spectral libraries (that you can download from http://speclib.jpl.nasa.gov) and USGS spectral libraries. Therefore, spectral signatures can be manipulated, providing great flexibility to the classification process. Moreover, the possibility to import spectral signatures allows for the classification of images avoiding ROI creation, easing the classification of large areas or several images.
Also, the spectral signature plots are more interactive and user friendly (changing colors, renaming signatures, moving the legend with the mouse).

The SCP spectral signature plot


The installation of version 3 is very simple because it requires less dependencies.
Following, a very brief installation guide:
  • For Windows 32 bit, download the QGIS installer from here; then install the SCP;
  • For Windows 64 bit, download the QGIS installer from here; then install the SCP;
  • For Linux, install QGIS and the python-scipy package; then install the SCP;
  • For Mac OS, install QGIS (and GDAL) from here and the python modules Numpy, Scipy, and Matplotlib from here; then install the SCP.

In the following days I am going to post new tutorials, and soon I am going to update the user manual.
For the moment, the plugin user manual of version 2.5 is a good reference, but here a few instructions before getting started with the new version:
  • Input images (already loaded in QGIS) are selected from the toolbar; the training shapefile is defined in the ROI creation dock; the signature list (an .xml file where spectral signatures are saved) is defined in the Classification dock;
  • the wavelength of image bands must be defined in the Band set tab, even if it is a multiband raster image. A combo box allows for the rapid selection of band center wavelenght for several famous satellite sensors;
The SCP band set tab
  • ROIs are added in the table of the ROI creation dock; ROIs are defined by a Class ID (C ID) and Macroclass ID (MC ID); it is possible to rename and change these codes from this table (changing also the values in the training shapefile);
  • Highlighted ROIs can be added to the Signature list (single left click on an table item to highlight the item) with the button Add to signature; if two or more highighted ROIs have the same MC ID and C ID, a unique spectral signature is calculated considering all the pixels that are under those ROIs;
The SCP ROI creation dock
  • Spectral signatures are added in the table Signature list table of the Classification dock;  it is possible to rename and change the codes from the table; also, it is possible to change the color of the class (in the spectral signature plot and the classification result) with a double click on the item color of this table; in order to show the spectral signature plot, highlight one ore more signatures in the table and click the spectral signature button in the Classification dock;
  • Classification is performed with the checked spectral signatures in the Signature list table (in column S); double click on any table item in order to select/unselect all items; the classification colors are the same ones defined in this table for classes; if Use Macroclass ID is checked, then the MC ID code will be used for classification, and the first color of each Macroclass will be applied to the classification result.
The SCP Classification dock
  • The signature list is saved in the xml file defined in the Signature list table, and it is overwritten when the QGIS project is saved; in order to create a new signature list file, click the button Save;
  • You can increase the RAM value in the Settings tab (usually a half of the system memory is a good value), in order to reduce the processing time.

Finally, I would like to thank personally all the programmers of the Processing plugin, Orfeo Toolbox, SAGA GIS, and GRASS GIS, wonderful opensource GIS software that was required by the previous SCP versions. Possibly, in the future there will be other forms of integration between SCP and these programs.

The Semi-Automatic Classification Plugin 3 "Rome" is available through the QGIS repository, or can be downloaded here.

Following the trailer of the plugin.

Newer posts Older posts