Computes the confusion matrix of a classification
This application computes the confusion matrix of a classification map relatively to a ground truth. This ground truth can be given as a raster or a vector data. Only reference and produced pixels with values different from NoData are handled in the calculation of the confusion matrix. The confusion matrix is organized the following way: rows = reference labels, columns = produced labels. In the header of the output file, the reference and produced class labels are ordered according to the rows/columns of the confusion matrix.
This section describes in details the parameters available for this application. Table 4.114, page 682 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is ComputeConfusionMatrix.
Parameter key | Parameter type |
Parameter description |
in | Input image |
Input Image |
out | Output File name |
Matrix output |
ref | Choices |
Ground truth |
ref raster | Choice |
Ground truth as a raster image |
ref vector | Choice |
Ground truth as a vector data file |
ref.raster.in | Input image |
Input reference image |
ref.vector.in | Input File name |
Input reference vector data |
ref.vector.field | String |
Field name |
nodatalabel | Int |
Value for nodata pixels |
ram | Int |
Available RAM (Mb) |
inxml | XML input parameters file |
Load otb application from xml file |
outxml | XML output parameters file |
Save otb application to xml file |
|
||
|
||
|
||
|
||
|
Input Image The input classification image.
Matrix output Filename to store the output matrix (csv format)
Ground truth Choice of ground truth format Available choices are:
Value for nodata pixels Label for the NoData class. Such input pixels will be discarded from the ground truth and from the input classification map. By default, ’nodatalabel = 0’.
Available RAM (Mb) Available memory for processing (in MB)
Load otb application from xml file Load otb application from xml file
Save otb application to xml file Save otb application to xml file
To run this example in command-line, use the following:
To run this example from Python, use the following code snippet:
None
This application has been written by OTB-Team.