The multispectral images can be stored in various formats. A common format that is often used to store geospatial map data gathered from satellites is the ERDAS LAN format, which uses the extension .lan
. MATLAB can read these kinds of files using the function multibandread
. Since the files are multiband, in order for us to be able to visualize it in RGB, we must be able to limit the channels to three. This can be done in a single line of code, since multibandread
can define the bands that will be read into MATLAB. More details about using this function can be given using our usual tool, which is the help command:
>> help multibandread
The output of the previous code is as follows:
multibandread Read band interleaved data from a binary file X = multibandread(FILENAME,SIZE,PRECISION, OFFSET,INTERLEAVE,BYTEORDER) reads band-sequential (BSQ), band-interleaved-by-line (BIL), or band-interleaved-by-pixel (BIP...