FusionOfClassifications

在分类标签的基础上融合同一图像的多个分类地图。

描述

这个应用程序允许您融合多个分类映射,并生成单个更健壮的分类映射。融合可以通过多数投票的方式完成,也可以通过类标签上的Dempster Shafer组合方法来完成。

  • 多数投票:对于每个像素,选择得票数最高的类别。
  • Dempster Shafer:对于每个像素,选择信任函数最大的类别标签。该置信度函数通过大量置信度的Dempster Shafer组合来计算,并指示每个输入分类映射为每个标签值表示的置信度。此外,信任量是基于每个分类图的输入混淆矩阵,通过使用准确率或召回率,或总体准确率,或Kappa系数。因此,对于Dempster Shafer融合,每个输入分类映射需要与其对应的输入混淆矩阵文件相关联。
  • 在分类地图的融合中,不处理带有NODATA标签的输入像素。此外,所有输入分类器都被设置为NODATA的像素在输出融合图像中保持此值。
  • 在票数相等的情况下,未决定的标签被归因于像素。

参数

Input classifications -il image1 image2... Mandatory
List of input classification maps to fuse. Labels in each classification image must represent the same class.

The output classification image -out image [dtype] Mandatory
The output classification image resulting from the fusion of the input classification images.

Fusion method -method [majorityvoting|dempstershafer] Default value: majorityvoting
Selection of the fusion method and its parameters.

  • Majority Voting
    Fusion of classification maps by majority voting for each output pixel.
  • Dempster Shafer combination
    Fusion of classification maps by the Dempster Shafer combination method for each output pixel.

Dempster Shafer组合选项

Confusion Matrices -method.dempstershafer.cmfl filename1 filename2... Mandatory
A list of confusion matrix files (.csv format) to define the masses of belief and the class labels. Each file should be formatted the following way: the first line, beginning with a '#' symbol, should be a list of the class labels present in the corresponding input classification image, organized in the same order as the confusion matrix rows/columns.

Mass of belief measurement -method.dempstershafer.mob [precision|recall|accuracy|kappa] Default value: precision
Type of confusion matrix measurement used to compute the masses of belief of each classifier.

  • Precision
    Masses of belief = Precision rates of each classifier (one rate per class label).
  • Recall
    Masses of belief = Recall rates of each classifier (one rate per class label).
  • Overall Accuracy
    Mass of belief = Overall Accuracy of each classifier (one unique value for all the class labels).
  • Kappa
    Mass of belief = Kappa coefficient of each classifier (one unique value for all the class labels).

Label for the NoData class -nodatalabel int Default value: 0
Label for the NoData class. Such input pixels keep their NoData label in the output image and are not handled in the fusion process. By default, 'nodatalabel = 0'.

Label for the Undecided class -undecidedlabel int Default value: 0
Label for the Undecided class. Pixels with more than 1 fused class are marked as Undecided. Please note that the Undecided value must be different from existing labels in the input classifications. By default, 'undecidedlabel = 0'.

实例

从命令行执行以下操作:

otbcli_FusionOfClassifications -il classification1.tif classification2.tif classification3.tif -method dempstershafer -method.dempstershafer.cmfl classification1.csv classification2.csv classification3.csv -method.dempstershafer.mob precision -nodatalabel 0 -undecidedlabel 10 -out classification_fused.tif

来自Python的评论:

import otbApplication

app = otbApplication.Registry.CreateApplication("FusionOfClassifications")

app.SetParameterStringList("il", ['classification1.tif', 'classification2.tif', 'classification3.tif'])
app.SetParameterString("method","dempstershafer")

app.SetParameterString("method.dempstershafer.mob","precision")
app.SetParameterInt("nodatalabel", 0)
app.SetParameterInt("undecidedlabel", 10)
app.SetParameterString("out", "classification_fused.tif")

app.ExecuteAndWriteOutput()

另请参阅

ImageClassifier 应用程序