<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Multi-channel data storage format definition for visualization tasks on the example of SPOT-4 images</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>N Yu Sevastianova</string-name>
          <email>n.u.sevastianova@mail.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>N S Vinogradova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ural Federal University</institution>
          ,
          <addr-line>Mira street, 19, Ekaterinburg, Russia, 620002</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>302</fpage>
      <lpage>308</lpage>
      <abstract>
        <p>One of the features of a remote sensing data storage is the widespread utilization of large-capacity disk arrays. Emergency situations arising from the use of arrays can lead to the fact that the remote sensing data, usually stored in uncompressed form, may become partially damaged. But even with incomplete recovery, this kind of data can be used in the future to solve production problems. However, this recovery is sometimes hampered by incomplete knowledge of the format of the corrupted data. The article describes an approach to automatic recognition of multichannel data interleaving type (BIP, BIL or BSQ) and its application to a recovery of SPOT-4 remote sensing data stored in the segment format "SEG", which were damaged after a disk array failure.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        SPOT is a commercial high-resolution optical satellite earth observation system, which operated in
1998-2013 and aimed at solving environmental and agricultural problems, as well as used in such
fundamental areas, as climatology and oceanography [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1,2,3,4</xref>
        ]. The SPOT-4 device was a
multispectral observation system that carried out the survey in four spectral ranges (listed in table 1).
      </p>
      <sec id="sec-1-1">
        <title>Imaging Band panchromatic B1: green B2: red</title>
        <p>B3: near-IR</p>
      </sec>
      <sec id="sec-1-2">
        <title>Wavelength</title>
        <p>0.61–0.68 µm
0.50–0.59 µm
0.61–0.68 µm
0.78–0.89 µm</p>
        <p>
          In 2011-2012, the Space monitoring center of the Ural Federal University received a signal from
the SPOT-4 spacecraft and accumulated more than 1 TB of survey data in the original "raw" format
(RAW) and the post-processed «SEG» format. After the accident of disk storage in 2016, the data
were temporarily lost, but preliminary analysis of the results of the repair work showed that only a part
of the data that was stored on failed devices (3 hard disks out of 20) was finally lost. At the same time,
the storage file system remained weakly damaged, which made it possible to recover most of the files
(including SEG), and the chains of lost fragments have preserved their localization within the file, but
were written as zero bytes. Since SPOT-4 data is currently actively used in the educational process, the
question of the visualization possibility and further use of this data turned out to be extremely relevant.
In the course of solving this problem, among others, a problem of identifying the method of storing
multichannel data have arisen. Different recovering methods for corrupted data are developed last time
propose the approaches for recovering different remote sensing data types [
          <xref ref-type="bibr" rid="ref4 ref5">5,6</xref>
          ], i.e. hyperspectral data
[
          <xref ref-type="bibr" rid="ref6">7</xref>
          ] and SAR data [
          <xref ref-type="bibr" rid="ref7">8</xref>
          ], but the peculiarity of a problem considered here is that data are multispectral
and they have the specific corruption type (randomly located horizontal stripes of zeros pixels). There
are three main ways to record data in multichannel images [
          <xref ref-type="bibr" rid="ref8">9</xref>
          ]:
• BIL (byte interleaving by line): channels separated by lines;
• BIP (byte interleaving by pixel): pixel-by-pixel recording of spectral channels;
• BSQ (band sequential): per-channel recording.
        </p>
        <p>The presented storage methods have an associated header, which is usually represented in ASCII
encoding. This header contains basic information about the image, such as the format, the number of
rows and columns, the presence of a color map, can also contain auxiliary information, such as
geographic reference, authorship, imaging time.</p>
        <p>BIL uses a method of recording multi-channel images in which rows of values for each channel are
written sequentially. For example, in the case of a three-channel image, all three data channels are first
written to the first row, then to the second row, and so on until the last row of the image is written.</p>
        <p>BIP method implies that the data for each pixel is written sequentially. For example, when you
record a three-channel image, the data for the first, second, and third channels is recorded for the first
pixel of the first column; then the channel data is written for the first pixel of the second column, and
so on.</p>
        <p>
          For per-channel recording (BSQ), the information for each channel is recorded sequentially. In
other words, the data of all pixels of the first channel is recorded first, then all pixels of the second
channel are recorded and so on [
          <xref ref-type="bibr" rid="ref8">9</xref>
          ]. Automatic recognition of correct data interleaving type makes it
possible to organize the on-flow damaged data recovery.
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. The algorithm for the SPOT-4 data analysis</title>
      <p>As reference information, the sizes of images in bytes (which can be completely different) and the
number of SPOT-4 channels equal to four are used. For data analysis in MATLAB, an algorithm is
developed that allows you to select and analyze the method of multispectral data storage. At the first
stage, factorization of file size into the prime factors was performed, which allowed splitting the image
size to determine the number of columns and rows. It showed, that line size for SEG data is a multiple
of 3057, where the first 57 bytes of each channel contains metadata. Another approach may imply the
one-dimensional Fourier transform and spectral peaks analysis. The peaks positions correspond to the
image number of columns, and the latter makes it possible to determine the image size, but the
determination of interleaving type may be inconveniently.</p>
      <p>In order to set the desired data storage method, the images are opened with all three possible
options. Visual comparison of opened images revealed significant spatial differences (figure 1).</p>
      <p>The image that is opened in the assumption that the data stored as BIL, contained stripes along the
image columns, which deal with the violation of pixels interleaving method. The image, opened under
the assumption of BSQ way, also carries an incorrect pixel striping, that can be observed in the
figure 1c (more stripes along image diagonals). An image opened under the assumption that the data is
stored in a BIP manner represents the correct striping (figure 1a). Thus, for SPOT-4 remote sensing
data, the BIP is the correct way to store multispectral data.</p>
      <sec id="sec-2-1">
        <title>2.1. Analysis of the characteristics of the BIL format</title>
        <p>
          As noted earlier from the visual mapping, an image opened under the assumption using the BIL
storage method, has expressed bars in the direction of the image columns. In order to emphasize the
bands, spatial filtering methods were used. The following types of spatial filters have been tested
[
          <xref ref-type="bibr" rid="ref10 ref11 ref9">10,11,12</xref>
          ]:
• Laplace filters;
• line detection filters;
• Sobel operator;
• Roberts cross filter.
        </p>
        <p>The results are shown in figure 2.
b) c)</p>
        <p>Figure 1. Image fragment: а – opened as BIP; b – opened as BIL; c– opened as BSQ.</p>
        <p>Variance is calculated for all filtering results (for different channels and different fragments). The
variance along the row characterizes the spread of image brightness, thus being a quantitative indicator
of the presence of bands oriented along the columns of the image that occurs when the image is
opened under the assumption that the storage method is BIL. The maximum variance value is obtained
by using the Sobel filter. Figure 3 presents the results of variance calculation for images that are open
in the assumption of BIP and BSQ, with the application of the Sobel operator. The maximum variance
of the image opened in assumption correct method of storage, do not exceed any fragments the
maximum variance of another image opened in the assumption is a wrong way to storage. As can be
seen, the image variance, opened with the correct pixel alternation method, does not have sharp
changes in comparison with the open with the help of BIL and seems to be smoother. Thus, on the
basis of visual comparison and analysis of variance, one can conclude that the Sobel operator is the
best filter in the problem of line selection in the direction of image columns.</p>
        <p>Figure 4 shows fragments of filtered images using the Sobel operator. The image opened in the
assumption method of BIP storing, has no sharp boundary changes, while the image that is open in the
BIL assumption, shows sharp stripes in the column direction, which is expressed quantitatively in the
calculation of the variance of the image. Thus, this feature can be used as an indicator of identification
of the storage format correctness for SPOT-4 data and, possibly, other remote sensing data types.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Analysis of the BSQ format characteristics</title>
        <p>As noted earlier, the image, which is opened under the assumption of the BSQ storage method, an
arbitrary pixel alternation is expressed, which looks like a strip along the diagonals. In order to
emphasize the stripes, spatial filtering methods are also used. In the course of the work the various
filters presented earlier were tested, as well as others, such as gradient filters and filtration using
homogeneity filter (Figure 5). Since the Sobel Operator and the Robinson cross operator are only used
to highlight horizontal or vertical lines, the image was rotated 45 degrees after filtering. The angle
four-channel data is 45 degrees.
c) d)
Figure 2. Image filtering result (BIL): a) Laplace filter; b) line detection filter;</p>
        <p>c) Sobel filter; d) Roberts cross operator.</p>
        <p>For all filtering results, the variance is also calculated, which shows that the Sobel operator
provides maximum contrast between the images opened under the assumption of BIP and BSQ. Figure
7 presents the results of variance calculation for images that are opened in the assumption BIP and
BSQ, with the help of the Sobel operator. The variance of a data fragment opened by the BIP method
is smoother than the variance of another method. Thus, on the basis of visual comparison and analysis
of variance, it can be concluded that the Sobel operator in this case also emphasizes the selection of
lines in the direction of the image columns. Figure 6 shows the image fragments filtered by the Sobel
operator. The image opened in the assumption with the BSQ method, has vertical stripes, and for the
other image that is opened in the assumption with BIP, this is not observed.</p>
        <p>The example of SPOT-4 recovered data is shown in figure 8. The horizontal black stripes
correspond to the data segments, which were located at the damaged disk drives. Vertical stripe at the
left edge has the width about 57 bytes (per channel) and contains service information and metadata.
The relative number of damaged stripes is about 13.8%, and it fits the number of damaged disks (3 of
20).</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Results</title>
      <p>An algorithm was developed and implemented in MATLAB, that allows one to determine
automatically the correct way to multispectral data storage method in terms of pixel interleaving. The
algorithm was tested on the example of SPOT-4 remote sensing data stored in post-processed
SEGformat. The algorithm is based on Sobel spatial filtering, which emphasizes the geometric features of
the image opened in the correct way. In case of an incorrect way, the variance calculated along the line
of the image gives inflated values, thus it becomes possible to identify an adequate way of data
interleaving type. The algorithm shows reliable results on eighty-seven different fragments of SPOT-4
remote sensing data in four different channels. The proposed algorithm was used for SPOT-4 data
restoration after the disk storage failure.</p>
      <p>a)
b)</p>
      <p>c)
d) e) f)
Figure 5. Scene filtration results: a) Laplace filter; b) lines detection filter; c) Sobel operator;
d) Roberts cross operator; e) gradient filter; e) homogeneity operator.</p>
    </sec>
    <sec id="sec-4">
      <title>4. References</title>
      <p>Arnaud M, Leroy M 1991 ISPRS Journal of Photogrammetry and Remote Sensing 46(4)
205</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Yurikova</surname>
            <given-names>E A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kokutenko</surname>
            <given-names>A A</given-names>
          </string-name>
          and
          <string-name>
            <surname>Sukhinin</surname>
            <given-names>A I</given-names>
          </string-name>
          <year>2008</year>
          <article-title>Research of opportunities of application of data SPOT-4 for interpretation the areas of vegetation damaged by fires Vestnik Sibirskogo gosudarstvennogo aerokosmicheskogo universiteta im</article-title>
          .
          <source>akademika M.F. Reshetneva</source>
          <volume>4</volume>
          <fpage>75</fpage>
          -
          <lpage>78</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Plotnikov</surname>
            <given-names>D Y</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kolbudaev</surname>
            <given-names>P A</given-names>
          </string-name>
          and
          <string-name>
            <surname>Bartalev</surname>
            <given-names>S A</given-names>
          </string-name>
          <year>2018</year>
          <article-title>Identification of dynamically homogeneous areas with time series segmentation of remote sensing data</article-title>
          <source>Computer Optics</source>
          <volume>42</volume>
          (
          <issue>3</issue>
          )
          <fpage>447</fpage>
          -
          <lpage>456</lpage>
          DOI: 10.18287/
          <fpage>2412</fpage>
          -6179-2018-42-3-
          <fpage>447</fpage>
          -456
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Boori</surname>
            <given-names>M S</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paringer</surname>
            <given-names>R</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Choudhary</surname>
            <given-names>K</given-names>
          </string-name>
          and
          <article-title>Kupriyanov A 2018 Comparison of hyperspectral and multi-spectral imagery to building a spectral library and land cover classification performance</article-title>
          <source>Computer Optics</source>
          <volume>42</volume>
          (
          <issue>6</issue>
          )
          <fpage>1035</fpage>
          -
          <lpage>1045</lpage>
          DOI: 10.18287/
          <fpage>2412</fpage>
          -6179-2018-42-6-
          <fpage>1035</fpage>
          -1045
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Dong</surname>
            <given-names>J</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yin</surname>
            <given-names>R</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sun</surname>
            <given-names>X</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            <given-names>Q</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            <given-names>Y</given-names>
          </string-name>
          and
          <string-name>
            <surname>Qin X 2019</surname>
          </string-name>
          <article-title>Inpainting of Remote Sensing SST Images with Deep Convolutional Generative Adversarial Network IEEE Geoscience</article-title>
          and
          <source>Remote Sensing Letters</source>
          <volume>16</volume>
          (
          <issue>2</issue>
          )
          <fpage>173</fpage>
          -
          <lpage>177</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Chang</surname>
            <given-names>Y</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yan</surname>
            <given-names>L</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            <given-names>T</given-names>
          </string-name>
          and
          <string-name>
            <surname>Zhong S 2016 Remote Sensing Image Stripe Noise Removal</surname>
          </string-name>
          :
          <source>From Image Decomposition Perspective IEEE Transactions on Geoscience and Remote Sensing</source>
          <volume>54</volume>
          (
          <issue>12</issue>
          )
          <fpage>7018</fpage>
          -
          <lpage>7031</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Eason</surname>
            <given-names>D</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Andrews</surname>
            <given-names>M 2014</given-names>
          </string-name>
          <article-title>Compressed hyperspectral image recovery via total variation regularization assuming linear mixing</article-title>
          <source>IEEE International Conference on Image Processing 620-624</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Biondi</surname>
            <given-names>F 2017</given-names>
          </string-name>
          <article-title>Recovery of Partially Corrupted SAR Images by Super-</article-title>
          <source>Resolution Based on Spectrum Extrapolation IEEE Geoscience and Remote Sensing Letters</source>
          <volume>14</volume>
          (
          <issue>2</issue>
          )
          <fpage>139</fpage>
          -
          <lpage>143</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Bossler J D 2010</surname>
          </string-name>
          <article-title>Manual on geospatial science and technology. Second edition (Boca Raton:</article-title>
          CRC Press) p
          <fpage>832</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Sirota</surname>
            <given-names>A A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Solomatin</surname>
            <given-names>A I</given-names>
          </string-name>
          <year>2008</year>
          <article-title>Statistical algorithms for detecting the boundaries of objects in the image</article-title>
          <source>Vestnik VGU</source>
          <volume>1</volume>
          <fpage>58</fpage>
          -
          <lpage>64</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Gruzman</surname>
            <given-names>I S</given-names>
          </string-name>
          <year>2012</year>
          <article-title>Synthesis of optimal differentiators for the locally oriented texture detection algorithm</article-title>
          <source>Computer Optics</source>
          <volume>36</volume>
          (
          <issue>1</issue>
          )
          <fpage>109</fpage>
          -
          <lpage>115</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Zhuravel</surname>
            <given-names>Y N</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fedoseev</surname>
            <given-names>A A</given-names>
          </string-name>
          <year>2013</year>
          <article-title>The features of hyperspectral remote sensing data processing under environment monitoring tasks solution</article-title>
          <source>Computer Optics</source>
          <volume>37</volume>
          (
          <issue>4</issue>
          )
          <fpage>471</fpage>
          -
          <lpage>476</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>