GenericRegionMerging¶
基于区域合并算法的图像分割
描述¶
- 这个应用程序允许使用通用区域合并库(GRM)。
- 它目前提供了3个齐性准则:欧几里德距离、全Lambda调度和Baatz&Schape准则。
参数¶
Input Image -in image
Mandatory
Ouput Label Image -out image [dtype]
Mandatory
Homogeneity criterion to use -criterion [bs|ed|fls]
Default value: bs
- Baatz & Schape
- Euclidean Distance
- Full Lambda Schedule
Threshold for the criterion -threshold float
Mandatory
Number of iterations -niter int
Default value: 0
Activate it to boost the segmentation speed -speed int
Default value: 0
Weight for the spectral homogeneity -cw float
Default value: 0.5
Weight for the spatial homogeneity -sw float
Default value: 0.5
实例¶
从命令行执行以下操作:
otbcli_GenericRegionMerging -in QB_Toulouse_Ortho_XS.tif -out labels.tif -criterion bs -threshold 60 -cw 0.7 -sw 0.3
来自Python的评论:
import otbApplication
app = otbApplication.Registry.CreateApplication("GenericRegionMerging")
app.SetParameterString("in", "QB_Toulouse_Ortho_XS.tif")
app.SetParameterString("out", "labels.tif")
app.SetParameterString("criterion","bs")
app.SetParameterFloat("threshold", 60)
app.SetParameterFloat("cw", 0.7)
app.SetParameterFloat("sw", 0.3)
app.ExecuteAndWriteOutput()
局限性¶
此应用程序不适用于大图像。