4. SCP panel¶
El Panel SCP permita la definición de las entradas, la creación de ROIs (Regiones de Interés) y firmas espectrales, y la clasificación de una imagen de entrada.
La Imagen de entrada, a ser clasificada, puede ser un ráster multibanda o un conjunto de bandas individuales definido en Conjunto de bandas.
El Entrada de Entrenamiento, creado con SCP, guarda los polígonos ROI y las firmas espectrales utilizadas para la clasificación de cobertura del suelo de la Imagen de entrada.
Las ROIs son polígonos utilizados para la definición de firmas espectrales características de las clases de cobertura del suelo. SCP permite la creación de polígonos ROI temporales utilizando un algoritmo de región incremental o dibujándolos manualmente. Al utilizar el algoritmo de región incrementa, la imagen es segmentada alrededor de un píxel semilla incluyendo los píxeles espectralmente homogéneos. Polígonos ROI temporales`pueden ser grabados en el ref:`training_input junto con las firmas espectrales del ROI. Es importante notar que la clasificación está siempre basada en las firmas espectrales.
En SCP`las clases de cobertura del suelo (y ROIs) están definidas con un sistema de :guilabel:`Clases (Clase ID) y Macroclases (Macroclase ID) (ver Clases y Macroclases) que son utilizadas para el proceso de clasificación. Cada Macroclase ID está relacionada a una Información de Macroclase (ej. nombre de macroclase), y cada Clase ID está relacionada a una Información de Clase (ej. nombre de clase), pero sólo el Macroclase ID y el Clase ID son utilizados en el proceso de clasificación.
La Entrada de Entrenamiento está compuesta por una parte vectorial (i.e. un archivo shape) y una parte de firma espectral, las cuales son independientes. La tabla de atributos del vector contiene cuatro capos, como se muestra en la siguiente tabla.
Atributos de la Entrada de Entrenamiento
Descripción |
Nombre de Campo |
Tipo de Campo |
---|---|---|
Macroclase ID |
MC_ID | int |
Información de Macroclase |
MC_Info |
texto |
Clase ID |
C_ID | int |
Información de Clase |
C_Info |
texto |
Las firmas espectrales de las clases son calculadas a partir de los ROIs y grabadas en la Entrada de Entrenamiento. Adicionalmente, las firmas espectrales pueden ser importadas de otras fuentes (ver Importar firmas).
El uso de Macroclase ID o Clase ID para la clasificación es definida con la opción Usar MC ID o C ID in Classification algorithm. Es importante notar que cuando se usa Macroclase ID todas las firmas espectrales son evaluadas separadamente y cada píxel es clasificado con el correspondiente MC ID (i.e. no se combinan las firmas antes de la clasificación).
La clasificación puede ser ejecutada para toda la imagen ( Classification output ) opara una parte de ella, creando una Clasificación preliminar.
Las funciones se describen en detalle en los siguientes párrafos, usando estas convenciones:
= Configuración guardada en el proyecto activo de QGIS
= Configuración guardada en el registro de QGIS
4.1. SCP entrada de datos¶
4.1.1. Imagen de entrada¶
Esta sección permite la selección de la imagen a ser clasificada. Los rásters deben estar ya cargados en QGIS.
La Imagen de entrada, a ser clasificada, puede ser un ráster multi-banda o un conjunto de bandas individuales definido en Conjunto de bandas. Si se selecciona un ráster multi-banda, las bandas ráster son listadas en Conjunto de bandas.
: abre uno o más archivos ráster y los añade a Conjunto de bandas;
: abre el Conjunto de bandas;
Imagen de Entrada : selecciona la imagen de entrada de una lista de imágenes multiespectrales cargadas en QGIS; si Conjunto de bandas está definido, entonces esta lista contendrá el item << band set >>;
4.1.2. Entrada de Entrenamiento¶
La Entrada de Entrenamiento es un archivo ``.scp``creado en guilabel:SCP (i.e. un archivo zip conteniendo un shapefile y un archivo xml) utilizado para guardar las ROIs y las firmas espectrales.
Atención: Los archivos de listas de firmas creados con versiones anteriores de SCP no son compatibles con SPC 5; sin embargo, es posible importar un shapefile de ROIs usando la herramienta :ref:ìmport_shapefile_tab`.
Las ROIs y firmas espectrales se muestran en la ROI Signature list. ROIs y firmas espectrales pueden ser importadas de otras fuentes (ver Importar firmas) y exportadas (ver Exportar firmas). Las ROIs se musetran en QGIS como un archivo vectorial (para prevenir pérdida de datos, no se debe editar esta capa usando las funciones de QGIS).
: Abrir un archivo de entrada de entrenamiento; Las ROIs y firmas espectrales son cargadas en ROI Signature list; theel archivo vectorial de la entrada de entrenamiento es cargada en 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 Descarga de Imágenes;
- : open the Herramientas;
- : open the Preprocesamiento;
- : open the Postprocesamiento;
- : open the Calculadora de Bandas;
- : open the Configuración;
- : 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 Panel.
4.2. Panel para Clasificación¶
The Classification dock is designed to manage the spectral signatures, and classify the Imagen de entrada.
4.2.1. ROI Signature list¶
The ROI Signature list displays the ROI polygons and spectral signatures contained in the Entrada de Entrenamiento. 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 Entrada de Entrenamiento 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;
: muestra las firmas espectrales del ROI en el Gráfico de Firmas Espectrales; la firma espectral es calculada desde la Imagen de entrada;
- : open the Gráfico de Dispersión;
- : open the tab Exportar firmas;
- : open the tab Importar firmas;
4.2.2. ROI creación de¶
ROI creation is complementary to the Barra de Trabajo and it allows for saving ROIs to the Entrada de Entrenamiento defining classes and macroclasses. A Conjunto de bandas 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 Entrada de Entrenamiento;
- Calculate sig. : if checked, while saving a ROI, the spectral signature thereof is calculated (from Imagen de entrada pixels under ROI polygon) and saved to Entrada de Entrenamiento (calculation time depends on the band number of Imagen de entrada);
- : save the temporary ROI to the Entrada de Entrenamiento using the defined classes and macroclasses; ROI is displayed in the ROI Signature list;
- Display : if the ROI creation pointer is active (see Barra de Trabajo), 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 Conjunto de bandas;
- 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 Imagen de entrada 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 Barra de Trabajo are being changed;
- Automatic plot: calculate automatically the temporary ROI spectral signature and display it in the Gráfico de Firmas Espectrales (
MC Info
of this spectral signature is settempo_ROI
);
4.2.3. Macroclasses¶
Macroclasses allows for the definition of Macroclass names and colors (used to display the results of Clasificación preliminar 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 Entrada de Entrenamiento.
4.2.3.1. Estilo de la clasificación¶
In addition, a previously saved classification style (QGIS .qml file) can be loaded and used for classification style.
4.2.4. Classification algorithm¶
The Classification algorithm includes several functions for the classification process used also during the Clasificación preliminar.
- 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 Peso de banda del algoritmo for the definition of band weights;
4.2.4.1. Algoritmo¶
Classification is performed using the selected algorithm.
: available Algoritmos de clasificación are:
- Threshold : it allows for the definition of a classification threshold (applied to all the spectral signatures); for advanced settings see Umbral de firma; if threshold is equal to 0, then no threshold is considered and all image pixels are classified; otherwise:
para Distancia mínima, los pixeles no serán clasificados si la distancia es mayor que el valor del umbral;
para Máxima Probabilidad, los pixeles no serán clasificados si la probabilidad es menor que el valor del umbral (máx 100);
- for Spectral Angle Mapping, pixels are unclassified if spectral angle distance is greater than threshold value (max 90);
: open the Umbral de firma 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 Algoritmo (see Umbral LCS). 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 Algoritmo is used for unclassified pixels of the Land Cover Signature Classification; if only overlap is checked, the selected Algoritmo 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 Umbral LCS;
4.2.5. Classification output¶
Classification output allows for the classification of the Imagen de entrada 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 Clasificación a vectorial);
- 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 Reporte de la clasificación); - Save algorithm files : if checked, the Ráster de Algoritmo 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;