MorphologicalClassification

对输入图像通道执行形态上的凸面、凹面和平面分类

描述

该算法基于以下出版物:Martino Pesaresi和Jon Alti Benediktsson,IEEE成员:一种用于高分辨率卫星图像形态分割的新方法。《IEEE地球科学和遥感学报》,第39卷,第2期,2001年2月,第309-320页。

This application perform the following decision rule to classify a pixel between the three classes Convex, Concave and Flat. Let f denote the input image and \psi_{N}(f) the geodesic leveling of f with a structuring element of size N. One can derive the following decision rule to classify f into Convex (label \stackrel{\smile}{k}), Concave (label \stackrel{\frown}{k}) and Flat (label \bar{k}): f(n) = \begin{cases} \stackrel{\smile}{k} & : f-\psi_{N}(f)>\sigma \\ \stackrel{\frown}{k} & : \psi_{N}(f)-f>\sigma \\ \bar{k} & : \mid f - \psi_{N}(f) \mid \leq \sigma \end{cases}

输出为带标签的图像(0:平面,1:凸面,2:凹面)

参数

Input Image -in image Mandatory
The input image to be classified.

Output Image -out image [dtype] Mandatory
The output classified image with 3 different values (0: Flat, 1: Convex, 2: Concave)

Selected Channel -channel int Default value: 1
The selected channel index for input image

Structuring Element Type -structype [ball|cross] Default value: ball
Choice of the structuring element type

  • Ball
  • Cross

Radius -radius int Default value: 5
Radius of the structuring element (in pixels), default value is 5.

Sigma value for leveling tolerance -sigma float Default value: 0.5
Sigma value for leveling tolerance, default value is 0.5.

Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).

实例

从命令行执行以下操作:

otbcli_MorphologicalClassification -in ROI_IKO_PAN_LesHalles.tif -channel 1 -structype ball -radius 5 -sigma 0.5 -out output.tif

来自Python的评论:

import otbApplication

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

app.SetParameterString("in", "ROI_IKO_PAN_LesHalles.tif")
app.SetParameterInt("channel", 1)
app.SetParameterString("structype","ball")
app.SetParameterInt("radius", 5)
app.SetParameterFloat("sigma", 0.5)
app.SetParameterString("out", "output.tif")

app.ExecuteAndWriteOutput()

局限性

形态分类的生成是不可流畅的,在设置结构元素的半径大小时要注意这一事实。

另请参阅

OtbConvexOrConave分类筛选器类