SplitImage

将N个多波段图像分割为N个图像。

描述

这个应用程序将N波段图像分割成N个单波段图像。输出图像的文件名将从输出参数生成。因此,如果输入图像具有2个通道,并且用户已经将输出参数outimage.tif设置为,则生成的图像将是outimage_0.tif和outimage_1.tif。

参数

Input Image -in image Mandatory
Input multiband image filename.

Output Image -out image [dtype] Mandatory
The output filename will be used to get the prefix an the extension of the output written's image. For example with outimage.tif as output filename, the generated images will had an indice (corresponding at each bands) between the prefix and the extension, such as: outimage_0.tif and outimage_1.tif (if 2 bands).

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

实例

从命令行执行以下操作:

otbcli_SplitImage -in VegetationIndex.hd -out splitImage.tif

来自Python的评论:

import otbApplication

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

app.SetParameterString("in", "VegetationIndex.hd")
app.SetParameterString("out", "splitImage.tif")

app.ExecuteAndWriteOutput()

另请参阅