For instance, the separate grayscale bands representing the red, green and blue channels can be combined into a single RGB composite image. To do this using OTB, the following steps can be done.
- Open up a OSGeo4W Command Prompt.
- At the prompt, type in the otbcli_concatenateImages command with options:
C:\> otbcli_concatenateImages -il band_red.tif band_green.tif band_blue.tif -out rgb.tif uint16
where
band_red.tif, band_green.tif, and band_blue.tif are the input files in the correct order,
rgb.tif is the output RGB composite file
uint16 is the output file datatype. By default it is float32 but that is too much. - Run the command.
Processing messages appear. The bands are merged into the output file rgb.tif. - Optional. Display the resultant file in a suitable viewer.
Similarly, to combine the separate grayscale bands into a composite Colored Infra-Red CIR file, the following steps can be done.
- Open up a OSGeo4W Command Prompt.
- Type in the otbcli_concatenateImages command.
C:\> otbcli_concatenateImages -il band_nir.tif band_red.tif band_green.tif -out cir.tif uint16
Where
band_nir.tif, band_red.tif, and band_green.tif are the ordered input bands
cir.tif is the output file name
uint16 is the output file data type - Run the command.
Processing messages appear. The bands are merged into the output file cir.tif. - Optional. Display the resultant file in a suitable viewer.
No comments:
Post a Comment