5.1.11 Split Image

Split a N multiband image into N images

Detailed description

This application splits a N-bands image into N mono-band images. The output images filename will be generated from the output parameter. Thus if the input image has 2 channels, and the user has set an output outimage.tif, the generated images will be outimage_0.tif and outimage_1.tif

Parameters

This section describes in details the parameters available for this application. Table 5.11, page 405 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is SplitImage.




Parameter key

Parameter type

Parameter description




in

Input image

Input Image

out

Output image

Output Image

ram

Int

Available RAM (Mb)

inxml

XML input parameters file

Load otb application from xml file

outxml

XML output parameters file

Save otb application to xml file








Figure 5.11: Parameters table for Split Image.

Example

To run this example in command-line, use the following:

otbcli_SplitImage -in VegetationIndex.hd -out splittedImage.tif

To run this example from Python, use the following code snippet:

#!/usr/bin/python 
 
# Import the otb applications package 
import otbApplication 
 
# The following line creates an instance of the SplitImage application 
SplitImage = otbApplication.Registry.CreateApplication("SplitImage") 
 
# The following lines set all the application parameters: 
SplitImage.SetParameterString("in", "VegetationIndex.hd") 
 
SplitImage.SetParameterString("out", "splittedImage.tif") 
 
# The following line execute the application 
SplitImage.ExecuteAndWriteOutput()

Limitations

None

Authors

This application has been written by OTB-Team.