meta data for this page
ReadImage – Spectral Band Arguments
There are three kinds of images that Hoku deals with – monochrome, color, and multi-spectral. A monochrome image has one spectral band, a color image has 3 – red, green, and blue, while a multi-spectral image has more than 1 spectral band. It could have tens of bands, or even hundreds.
If an image has N spectral bands, then those bands are referred to with the numbers of (0) to (N-1). A color image has 3 bands, numbered 0 to 2.
The “bands” argument is where “ReadImage” is told what bands should be read and to be included in the image that it outputs. The argument is the numbers of the bands to be included. The user will be warned if any band numbers requested do not exist in the input image.
Band numbers in the argument can be entered in a few different ways. Single band numbers can be entered individually, separated by spaces or by semicolons, such as “2 4 5 8”. A range of bands can be entered as “start:stop” where the “start” and the ”stop” bands, and all the bands in between are included. In the example shown above, the bands “0 1 2” are included. If the range is written as “start+stop”, then all the bands between, and including ”start” and “stop”, are averaged together and output as one band.