First, we paste a remote sensing 3-channel (3-band) image to see how it is represented in the computer. Then introduce several storage methods of multi-band data.
The package of matlab must be very clear about this representation method, that is, a band corresponds to a matrix.
How multiband data is stored
There are three main ways to store multi-band data:
1. Store BSQ by band
2. Store BIL line by line
3. Store BIP pixel by pixel
Store BSQ by band
Band-by-band storage is to store the data of one band together, so it is better for the operation of reading one band at a time, but if each operation involves data of several bands, such a storage method is not enough for the memory. Occupies relatively large. That is to say, band-by-band storage is beneficial for processing spatial information. The example diagram is as follows:
Store BIPs on a per-pixel basis
The pixel-by-pixel storage stores the data of one pixel first, and then stores the data of other pixels, that is to say, the spectral information of the same pixel is stored in a continuous address, so that the spectral information of the pixel is frequently manipulated. It is very convenient and quick to operate.
Store BIL line by line
Row-by-line storage is a method between band-by-band storage and pixel-by-pixel storage. It stores each row of each channel together. Specifically, the first row of channel 1 is stored, and then the first row of channel 2 is stored. 1 line, then the 1st line of the 3 channel, ..., when the 1st line is stored, the data of the 2nd line is stored.
Summarize the pros and cons of the method
A summary of the above methods:
Band-by-Band Storage (BSQ) is beneficial to the display and processing of image spatial distribution information.
Pixel-by-pixel storage (BIP) facilitates the display and processing of image element spectral information.
The line-by-line storage (BIL) takes into account the display and processing of image spatial distribution information and pixel spectral information.