SplitImage - 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 as output parameter, 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 [1] presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is SplitImage .
[1] | Table: Parameters table for Split Image. |
Parameter Key | Parameter Name | Parameter Type |
---|---|---|
in | Input Image | Input image |
out | Output Image | Output image |
ram | Available RAM (Mb) | Int |
inxml | Load otb application from xml file | XML input parameters file |
outxml | Save otb application to xml file | XML output parameters file |
- Input Image: Input multiband image filename.
- Output Image: 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): Available memory for processing (in MB).
- Load otb application from xml file: Load otb application from xml file.
- Save otb application to xml file: Save otb application to xml file.
Example¶
To run this example in command-line, use the following:
otbcli_SplitImage -in VegetationIndex.hd -out splitImage.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", "splitImage.tif")
# The following line execute the application
SplitImage.ExecuteAndWriteOutput()
Limitations¶
None
Authors¶
This application has been written by OTB-Team.
See Also¶
- These additional resources can be useful for further information:
- ConcatenateImages