<!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>Patterns Detection in SAED Images of Transmission Electron Microscopy*</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>S. Nebaba</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>D. Zavyalov</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A. Pak</string-name>
          <email>ayapak@tpu.ru</email>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Tomsk Polytechnic University</institution>
          ,
          <addr-line>Tomsk</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <fpage>0000</fpage>
      <lpage>0001</lpage>
      <abstract>
        <p>Specialized software that supports existing approaches to processing images of the crystal structure of materials for analyzing transmission electron microscopy images have a lot of different digital image processing methods, but major part of it are weakly automated. Automatic algorithm is able to make the crystal structure analysis more fast and effective process. The paper considers the problem of automated processing of SAED images of transmission electron microscopy. Proposed automated image processing algorithm based on methods of adaptive binarization and Watershed segmentation allows one to determine the distances on the diffraction pattern of a material sample on the image of transmission electron microscopy. The proposed algorithm has been tested on several SAED images, distances were calculated in automatic mode and compared with the results of semi-automatic measurement in Digital Micrograph GMS 1.8 software. The analysis of the results showed high agreement in considered cases, which let us assume that proposed algorithm has good development prospects.</p>
      </abstract>
      <kwd-group>
        <kwd>Computer vision</kwd>
        <kwd>Image processing</kwd>
        <kwd>Image analysis</kwd>
        <kwd>Transmission electron microscopy</kwd>
        <kwd>Crystalline diffraction pattern</kwd>
        <kwd>Selected area electron diffraction</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Methods and algorithms of computer vision associated with the processing and
analysis of raster images are widely used in various fields of science [
        <xref ref-type="bibr" rid="ref1 ref2 ref3 ref4 ref5">1-5</xref>
        ], including
in the field of processing images obtained using electron microscopes. One of the
fundamental problems in these areas is the automation of assessing the composition
and structure of materials from their images. An effective solution of these problems
simplifies the tasks of non-destructive quality control of materials and products, their
identification and determination of their properties and appearance.
      </p>
      <p>Transmission electron microscopy (TEM) is used to assess the structure of the
material, both in the volume of the sample and in its surface region. TEM is one of the
most highly informative research methods used in materials science, solid state
physics, biology, and other sciences.</p>
      <p>The ability to observe the electron diffraction pattern simultaneously with the
image of the microstructure of the sample makes it possible to obtain valuable
information on the symmetry of the crystal lattice and structural defects of the
material under study. Comparison of microphotography with electron diffraction
patterns makes it possible to correlate the microstructure elements with a particular
crystalline or amorphous phase identified on the electron diffraction pattern.</p>
      <p>
        The development of information technology and computing devices contributes to
progress in solving such problems. However, nowadays, existing methods for
identifying and evaluating microobjects from a raster image do not have sufficient
universality that would make it easy to automate them. In addition, these methods and
algorithms are often part of proprietary software that is closely associated with
electronic microscopy equipment and is protected by the copyright of the
manufacturers of this equipment [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The cost of such equipment can be high, which
limits the availability of professional image analysis tools.
      </p>
      <p>At the same time, systems for analyzing such images can be widely demanded by
many scientific organizations as well as enterprises in the manufacturing sector,
making it possible to carry out operational control and analysis of the composition
and structure of materials and products. Cheap analogues of existing software for
critical areas of enterprise activity can stimulate the development of technologies for
the synthesis, analysis and production of micro- and nanomaterials. Ultimately,
improving the characteristics of materials for various purposes and products based on
them can both have a positive impact on the level of safety in many areas of human
activity, and contribute to the development of new technologies.</p>
      <p>
        Earlier in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], an automated algorithm was proposed for estimating the magnitude
of interplanar distances on images obtained in direct resolution mode.
      </p>
      <p>As the next task in the framework of automation and analysis of TEM results, the
most important is the determination of the crystal lattice parameters of material
samples from the electron diffraction patterns (Selected Area Electron Diffraction,
SAED). The task of decoding SAED is to determine the radii at which the diffraction
maximum is located relative to the image of the central electron beam (see Fig. 1) and
to recalculate the found values to the corresponding sizes of the interplanar spacings
of the crystal lattice on a known scale. An example of such an image processed in a
specialized software package Digital Micrograph GMS 1.8 from Gatan can be seen in
Fig. 1.</p>
    </sec>
    <sec id="sec-2">
      <title>Patterns Detection in SAED Images of Transmission Electron Microscopy 3</title>
      <p>Specialized software processes these pictures in a semi-automatic mode, requiring the
selection of starting points for calculations. In particular, by pressing a mouse button
the operator is invited to select two diffraction maxima, which, according to the
operator’s opinion, are located on the same diameter of the circle concentric to the
reflection of the central beam. Through this operation, the system sets a reference
point. Next, the operator, by clicking the mouse button, sets the points corresponding
in his opinion to the presence of a diffraction maxima at them. The system determines
the distance from the geometric center of the central beam to each designated point
and calculates the corresponding values of interplanar distances characteristic of the
analyzed crystalline material.</p>
      <p>With this approach, the software function is to determine the intensity of brightness
in a circular radius from the center of the diffraction pattern, as well as to calculate the
number of points on concentric circles and the distance between these circles, which
characterize the material sample. This approach requires manual choosing the center
of the image, as well as the centers of all the bright points in the image.</p>
      <p>In addition, not all SAED images are of the same high quality in terms of image
segmentation techniques. As an example of a “poor quality” image, an image with an
excessive brightness of the central area of the image is shown on Fig. 2, it is difficult
to identify diffraction maxima, which is typical for samples with nanoscale objects or
objects characterized by short-range order. Also a typical case is SAED image of
single-crystal shooting, on which diffraction maxima of the first, second, and other
orders can be identified. It can also be possible to trace symmetry in the arrangement
of diffraction maxima corresponding to symmetry in the crystal structure. This
symmetry may be combined with reflections typical of the graphite matrix in which
the crystal is located, as can be seen from the presence of ring reflections (Fig. 3).
These specific cases make it difficult to automate the image processing, which would
be equally effective in most special cases.</p>
      <p>
        A number of well-known image processing algorithms [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] were considered in the
perspective of their possible application to the problem of analyzing SAED images.
      </p>
      <p>
        As a result, a complex algorithm was developed. That algorithm includes the
Watershed automatic image segmentation method [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], the Hough transform for circles
detection in an image, adaptive binarization, and a number of other techniques.
      </p>
      <p>Given the specifics of the SAED images of materials, it was suggested that an
algorithm that dynamically changes the sensitivity threshold from the center of the
image to its edges can be quite effective for the task of evaluating these images.
2</p>
      <p>Automated algorithm for evaluation of distances on SAED images
As a result of a series of experiments, a sequence of methods and algorithms for
image processing and analysis was selected, which made it possible to obtain a stable
solution of problem of finding distances on the considered examples of SAED images</p>
    </sec>
    <sec id="sec-3">
      <title>Patterns Detection in SAED Images of Transmission Electron Microscopy 5</title>
      <p>in automatic mode.</p>
      <p>An integrated automated algorithm for evaluating distances in a SAED images (see
Fig. 4) can be described by the following sequence of steps:
1. Bilateral filtering of the original image (window size is 50 points and is determined
depending on the linear dimensions of the image), which allows reducing
highfrequency noise with minimal loss of significant information.
2. Calculation of a binary image of the result of bilateral filtering (brightness threshold
value equals 20 on the scale [0, 255]). A low brightness threshold makes it possible to
approximately estimate the center of the diffraction in SAED image with the bright
spot of illumination. The center of the diffraction in SAED image often does not
completely coincide with the center of the image.
3. The Hough transform for detecting circles is applied to a binary image. The circle
search parameters are selected for the reason that binarization with a low threshold
leaves enough information only to determine the center, but not for small bright
spherical objects in the image. To avoid false detection of small circles, the
parameters are determined based on the linear dimensions of the image (iW is the
image width in pixels, iH is the image height in pixels): the maximum circle radius
(MaxR) is defined as 1/3 of the width of the original image (iW/3), and minimum
(MinR) - 1/10 of its width (iW/10). The minimum distance between the centers of the
circles is set equal to the width of the image (MinDist = iW), which excludes the
detection of circles other than the central spot in the binary image. The scale factor of
the image is taken equal to 6 (k = 6).
4. Steps 2 and 3 are repeated to specify the center of the circle (Rcc) with more stringent
parameters. A binary image with a doubled brightness threshold is calculated (in the
considered examples – 40 on the scale [0, 255]).
5. The Hough transform is performed with the following parameters: the radii become
dependent on the radius of the circle found at the first iteration (Rfc): MaxR = Rfc +
iW/10, MinR = Rfc/5; k = 4. As a result of this sequence of steps, it is possible to
determine the point-center of the diffraction with higher accuracy. In the example
images, the discrepancy in the definition of the center compared to the manual
method was no more than 3 pixels.
6. Adaptive binarization of the initial image processed by the bilateral filter. This
algorithm takes into account the relative brightness of the local areas of the image and
does not set a strict binarization threshold, which is suitable for calculating the
distances to all significant bright objects in the image. The following parameters were
chosen as universal for SAED images: the block size is iW/40, the threshold number
for each block is 255, and the subtracted coefficient is C = -1. As a result of this
operation, all significant objects are highlighted on the image with a slight influence
of the noise components of the image.
7. Selection of object outlines by the Watershed algorithm on an image processed by
adaptive binarization.
8. The point-center (ci) is calculated for each contour through the central moments (mij)
[10]. If the point-center lies outside the contour, this object is excluded from further
consideration as being falsely defined.
9. The calculation of the distances between the point-center of diffraction in the SAED
image and the point-centers of each of the contours (ri). The contours obtained in step
6 can be processed in various ways (histogram construction, relative and absolute
brightness analysis, symmetry analysis), but the simplest way is to directly calculate
the distances.
10. The set of found distances to objects in the image is converted to the units of change
used (in the examples under consideration, Angstrom, the scale of measurement is 2
1/nm (Sn), the size of the scale in the image is 128 pixels (Sp = 128)) according to the</p>
      <p>Patterns Detection in SAED Images of Transmission Electron Microscopy 7
following formula:</p>
      <p>=  2 0∗∗   , (1)
where dci is the diameter of the circle built with the center at the point of the
diffraction in the SAED image through the center-point from the i-th object in the
image. Thus, knowing that dci = 2*rci formula (1) can also be represented as:
  = 1 0∗∗  . (2)
11. Distances are sorted by increasing values, close values are defined as duplicates with
a tolerance of 0.05 Angstrom, which is acceptable in most calculations. Based on
these data, one can get an idea of the number of points lying at one or another
distance from the diffraction center in the SAED image.
12. Assuming the assumption that distances that are repeated 2 or more times are
significant, we get a set of several key distances characterizing the chemical
composition of the substance in the image.
3</p>
      <p>Testing the developed algorithm and comparing the results
The developed algorithm has been tested on several SAED images (see Fig. 2 (a), 3
(b), 5 (c,d)). The software implementation of the proposed algorithm was performed
in the Microsoft Visual Studio development environment using the open source
library of computer vision algorithms and image processing openCV.</p>
      <p>c)</p>
      <p>d)</p>
      <p>Fig. 5.Examples of SAED images for testing the proposed algorithm
In Fig. 6-7 examples of binarization and the search for a center of diffraction in
SAED images are shown.</p>
      <p>Fig. 8 shows examples of adaptive image binarization.
d)
Fig.6. Binarization and diffraction center search
c) d)
Fig. 7. Binarization and search for a center of diffraction in SAED images with refined
parameters</p>
    </sec>
    <sec id="sec-4">
      <title>Patterns Detection in SAED Images of Transmission Electron Microscopy 9 b) d) Fig. 8.Examples of adaptive image binarization</title>
      <p>Further, the Watershed algorithm was applied to these images, the result of which can
be seen in Fig. 9.
d)</p>
      <p>Fig. 9.Watershed algorithm processing examples</p>
      <p>Results
d)</p>
      <p>Fig. 10. Distance measurement results on SAED Images
Analysis the problem of evaluation of the crystal structure parameters from the SAED
image of a material sample is carried out in the paper. Image processing methods
suitable for automating this task is identified.</p>
      <p>An automated image processing algorithm that makes it able to determine
distances on a SAED image of a material sample is proposed.</p>
      <p>The algorithm has been tested on several SAED images. An analysis of the results
showed that the proposed algorithm is promising. In particular, the advantages of the
developed method can be seen when there are many diffraction maxima on SAED,
the analysis of which is usually characterized by a subjective assessment of the
operator who choosing points.</p>
      <p>The development of this algorithm will make it able to automate an evaluation of
parameters of the crystal structure without involving specialized software.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Leutenegger</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chli</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Siegwart</surname>
          </string-name>
          , R.Y.:
          <article-title>BRISK: Binary Robust invariant scalable keypoints</article-title>
          .
          <source>In: Proceedings of the 2011 International Conference on Computer Vision</source>
          , ICCV 2011, pp.
          <fpage>2548</fpage>
          -
          <lpage>2555</lpage>
          . https://doi.org/10.1109/ICCV.
          <year>2011</year>
          .6126542
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Nebaba</surname>
            ,
            <given-names>S.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharova</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          :
          <article-title>An Algorithm for Building Deformable 3d Human Face Models and Justification of its Applicability for Recognition Systems</article-title>
          .
          <source>In: SPIIRAS Proceedings</source>
          <year>2017</year>
          , vol.
          <volume>52</volume>
          , pp.
          <fpage>157</fpage>
          -
          <lpage>179</lpage>
          . https://doi.org/10.15622/sp.52.8
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Schettini</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corchs</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          : Underwater Image Processing:
          <article-title>State of the Art of Restoration and Image Enhancement Methods</article-title>
          .
          <source>EURASIP Journal on Advances in Signal Processing</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Sokratis</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kavallieratou</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paredes</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sotiropoulos</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>A Hybrid Binarization Technique for Document Images</article-title>
          . In: Biba,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Xhafa</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          <article-title>(eds) Learning Structure and Schemas from Documents</article-title>
          .
          <source>Studies in Computational Intelligence</source>
          .
          <year>2011</year>
          , vol.
          <volume>375</volume>
          , pp.
          <fpage>893</fpage>
          -
          <lpage>898</lpage>
          . Springer, Berlin, Heidelberg (
          <year>2015</year>
          ). https://doi.org/10.10007/10.1109/IADCC.
          <year>2015</year>
          .7154834
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Alhadidi</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zu</surname>
            'bi,
            <given-names>M.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Suleiman</surname>
            ,
            <given-names>H.N.</given-names>
          </string-name>
          :
          <article-title>Mammogram Breast Cancer Image Detection Using Image Processing Functions</article-title>
          .
          <source>Information Technology Journal</source>
          <volume>6</volume>
          (
          <issue>2</issue>
          ),
          <fpage>217</fpage>
          -
          <lpage>221</lpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Gatan</given-names>
            <surname>Microscopy Suite Software</surname>
          </string-name>
          , https://www.gatan.com/products/tem
          <article-title>-analysis/gatanmicroscopy-suite-software</article-title>
          .
          <source>Last accessed 29 Jun 2020</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Nebaba</surname>
            ,
            <given-names>S.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pak</surname>
            ,
            <given-names>A.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zakharova</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          :
          <article-title>Automated Algorithm for Determining the Interplanar Distances of the Crystal Structure of a Substance from Transmission Electron Microscopy Images</article-title>
          .
          <source>In: CEUR Workshop Proceedings</source>
          .
          <year>2019</year>
          , vol.
          <volume>2485</volume>
          , pp.
          <fpage>248</fpage>
          -
          <lpage>251</lpage>
          . https://doi.org/10.30987/graphicon-2019
          <source>-2-248-251</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Gonzalez</surname>
            ,
            <given-names>R.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Woods</surname>
            ,
            <given-names>R.E.</given-names>
          </string-name>
          :
          <source>Digital Image Processing. 3rd edn</source>
          . Prentice-Hall, Inc., Upper Saddle River, NJ, USA (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Zaripova</surname>
            ,
            <given-names>A.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zaripov</surname>
            ,
            <given-names>D.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Usachev</surname>
            ,
            <given-names>A.E.</given-names>
          </string-name>
          :
          <article-title>Visualization of high-voltage insulators defects on infrared images using computer vision methods</article-title>
          .
          <source>Scientific Visualization</source>
          <volume>11</volume>
          (
          <issue>2</issue>
          ),
          <fpage>88</fpage>
          -
          <lpage>98</lpage>
          (
          <year>2019</year>
          )
          <fpage>10</fpage>
          .
          <string-name>
            <surname>Khvostikov</surname>
            ,
            <given-names>A.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krylov</surname>
            ,
            <given-names>A.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mikhailov</surname>
            ,
            <given-names>I.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Malkov</surname>
            ,
            <given-names>P.G.</given-names>
          </string-name>
          :
          <article-title>Trainable active contour model for histological image segmentation</article-title>
          .
          <source>Scientific Visualization</source>
          <volume>11</volume>
          (
          <issue>3</issue>
          ),
          <fpage>80</fpage>
          -
          <lpage>91</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>