Confusion matrix Computation
Brief Description
Computes the confusion matrix of a classification
Tags
Learning
Long Description
This application computes the confusion matrix of a classification map relative to a ground truth dataset. 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.
Parameters
Input Image (in): The input classification image.
Matrix output (out): Filename to store the output matrix (csv format)
set the output format to contingency table or confusion matrix (format): Choice of the output format as a contingency table for unsupervised algorithmsor confusion matrix for supervised ones.
Choice of a confusion matrix as output. (confusionmatrix):
Choice of a contingency table as output. (contingencytable):
Ground truth (ref): Choice of ground truth format
Ground truth as a raster image (raster):
Input reference image (ref.raster.in): Input image containing the ground truth labels
Value for nodata pixels in ref raster (ref.raster.nodata): Label to be treated as no data in ref raster.
Ground truth as a vector data file (vector):
Input reference vector data (ref.vector.in): Input vector data of the ground truth
Field name (ref.vector.field): Field name containing the label values
Value for nodata pixels in ref vector (ref.vector.nodata): Label to be treated as no data in ref vector. Please note that this value is always used in vector mode, to generate default values. Please set it to a value that does not correspond to a class label.
Value for nodata pixels in input image (nodatalabel): Label to be treated as no data in input image
Available RAM (Mb) (ram): Available memory for processing (in MB)
Load otb application from xml file (inxml): Load otb application from xml file
Save otb application to xml file (outxml): Save otb application to xml file
Limitations
None
Authors
OTB-Team
See also
Example of use
in: clLabeledImageQB1.tif
out: ConfusionMatrix.csv
ref: vector
ref.vector.in: VectorData_QB1_bis.shp
ref.vector.field: Class
ref.vector.nodata: 255
otbcli_ComputeConfusionMatrix -in clLabeledImageQB1.tif -out ConfusionMatrix.csv -ref vector -ref.vector.in VectorData_QB1_bis.shp -ref.vector.field Class -ref.vector.nodata 255