<!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 diffraction images of transmission electron microscopy</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>S.G. Nebaba, A.Ya. Pak Tomsk Polytechnic University</institution>
          ,
          <addr-line>Tomsk</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <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. In some tasks automated algorithms of image processing have been developed, e.g. in task of estimation of the width of a layer of material from a raster image. The paper considers the problem of automated processing of diffraction images obtained by transmission electron microscopy. A number of modifications, such as Watershed algorithm, binarization and Fast Fourier Transform, are proposed for existing image processing algorithms. These modifications can help automate the processing of the diffraction pattern of a material sample from an image of transmission electron microscopy. The given examples of image processing of particular cases of diffraction patterns have shown the prospects for the development of algorithm based on combination of the proposed modifications of considered algorithms. Adaptive binarization with Watershed segmentation would be useful in automated distance estimation in transmission electron microscopy images.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</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 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. 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
nondestructive quality control of materials and products, their
identification and determination of their properties and
appearance [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>Transmission electron microscopy (TEM) involves the
study of thin images using a beam of electrons passing
through them and interacting with them. The electrons that
pass through the sample are focused on the imaging
device: a fluorescent screen, a photographic plate or a
camera sensor. Using TEM, it is possible to study objects
even at the atomic level. At relatively low magnifications,
the contrast on the TEM arises due to the absorption of
electrons by the material of the test sample. At high
magnifications, the complex interaction of waves forms an
image that requires a more complex interpretation.
Modern TEMs have operating modes that allow one to
study the elemental composition of samples, crystal
orientation, phase shift of electrons, etc.</p>
      <p>The TEM method 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
(or, in other words, to observe cross sections of the
reciprocal lattice of the sample) 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. The TEM method can be applied to solve
problems such as:
• characterization of the structure of the sample in
volume and on the surface;
• determination of the qualitative phase composition of
the sample;
• determination of orientational relations between the
elements of the structure of the sample.</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="ref7">7</xref>
        ]. The cost of such equipment can be
high, which is unacceptable for a fairly significant part of
researchers and scientific organizations.
      </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>
        In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and many others papers, the practical use of
specialized software for processing images obtained using
an electron microscope, can be seen. That indicates the
development of this field of knowledge in the modern
world.
      </p>
      <p>Thus, the interdisciplinary topic under consideration
seems relevant and promising. There is a need to
systematize existing methods and algorithms for the
automated evaluation and processing of images and to
develop software for the evaluation and analysis of images
of electron microscopy based on them. In the future, this
could contribute to the development of software systems
for analyzing images of electron microscopes with the
possibility of mass application and implementation.</p>
    </sec>
    <sec id="sec-2">
      <title>Automation of the algorithm for estimating the width of a layer of material from a raster image</title>
      <p>
        Earlier in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], an automated algorithm was proposed
for estimating the width of material layers from a raster
image. The key idea of it is to select, normalize, and
evaluate an area with a regular layered structure of a raster
image obtained using an electron microscope. Also, affine
transformations were used in the algorithm in order to
build a regular structure strictly perpendicular to the
abscissa axis and simplify further calculations [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ],
binarization [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and the calculation of derivatives of the
obtained one-dimensional sequences.
      </p>
      <p>With the known relation between the image points and
the actual physical quantities, it is possible to obtain the
layer width estimated by the physical quantity.</p>
      <p>The proposed algorithm is quite simple from the point
of view of implementation, and does not require large
computational resources.</p>
      <p>The described algorithm was tested on several images
shoot in direct resolution mode; crystalline planes in the
composition of the crystalline material are visible in such
images (figure 1).</p>
      <p>As a result of comparing the values obtained in the
framework of the developed algorithm with the values
obtained by specialized software and used as reference,
insignificant discrepancies of the order of 0.005 nm were
obtained, which indicates the successful development of
an analogue to existing algorithms.
3.</p>
    </sec>
    <sec id="sec-3">
      <title>Determination of parameters of the crystal lattice of materials</title>
      <p>Within the framework of increasing the level of
automation of TEM algorithms, determining of the crystal
lattice parameters of material samples was chosen as the
next task.</p>
      <p>The phase composition and orientation of the crystals
can be determined from the diffraction patterns of the
samples.</p>
      <p>Diffraction contrast is formed as a result of elastic
scattering of transmitted electrons by regularly located
atoms in the crystal lattice.</p>
      <p>Contrast is used to determine the crystallinity of the
film and the lattice parameter (figure 3).</p>
      <p>
        The results were compared with the results of
calculations of specialized software (Gatan Microscopy
Suite v.1.8) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. An example of image processing using
this software is presented in figure 2.
      </p>
      <p>
        Specialized software processes these images in a
semiautomatic mode, requiring the selection of starting points
for calculations. An example of such processing is
presented in Figure 4 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>As can be seen from figure 4, the software function
consists of determination of brightness in a circular radius
from the center of the diffraction pattern, as well as
calculation of the number of points on concentric circles
and the distance between these circles, which characterize
the material sample. The problem with this approach is in
the necessity of accurate manual selection of the center of
the image and the distance to one of the concentric circles,
consisting of bright points.</p>
      <p>In addition, not all images of the diffraction pattern
have the same high quality, which allows to determine
important characteristics. Images with excessive
brightness of the central area can be the most frequent
example of low quality images (Figure 5). The situation
with reflection of points is also often can be found (Figure
6). These specific cases make difficulties in developing a
universal automatic algorithm that would be able to parse
all particular cases with the same efficiency.</p>
      <p>Evaluation of the effectiveness
processing algorithms in the
automating the determination
lattice parameters
of
of image
task of
crystal</p>
      <p>There are a number of algorithms that can be useful in
automating the processing of diffraction patterns. A
number of well-known image processing algorithms and
the possibilities of its applying to this task were
considered.</p>
      <p>For images with a sufficiently high contrast, the
determination of distances can be carried out by
transferring the entire image to the frequency domain, for
example, using a variation of the Fourier transform (DFT).
However, in case of irregular brightness or if the image
does not fit the conditions for such a conversion, it will be
impossible to determine anything from it.</p>
      <p>
        The Watershed method of automatic image
segmentation [
        <xref ref-type="bibr" rid="ref10 ref11">10,11</xref>
        ], available in the OpenCV library of
computer vision algorithms, was considered as one of the
possible directions in the automation of determining the
number and location of bright points in the image of the
diffraction pattern. An example of his work for such
images is presented in Figure 7.
      </p>
      <p>The advantages of using this algorithm are in
automatic selection of all areas with large differences in
the brightness of the image and in determination of their
size and position. The disadvantage of this algorithm is
that it is very sensitive to the choice of the brightness
threshold and to its irregular distribution in the processed
image. Figure 7 shows that, despite the successful
selection of points remote from the center, the entire area
in the center almost merges into one continuous segment.</p>
      <p>Given the specifics of the images of the diffraction
pattern of materials, it can be assumed that a modification
of this algorithm that dynamically changes the sensitivity
threshold from the center of the image to its borders can
become quite effective for the task of evaluating these
images.</p>
      <p>Another, simpler automation option may be the
calculation of a binary image according to a similar
principle, with a dynamic sensitivity threshold, taking into
account the decrease in brightness of images from the
center to the borders (Figure 8).
Thus, it can be assumed that for the task of determining
the characteristics of the diffraction pattern, the most
effective direction will be a complex algorithm combining
binarization and segmentation to automate the search for
the image center and bright points distant from it with the
algorithm for calculating the brightness of concentric
circles traditional for specialized software with previously
known positions of the center and distance to these circles.</p>
      <p>Further work in automation of the processing of
images of diffraction patterns will be carried out in the
direction of developing specific modifications of the
considered algorithms.</p>
    </sec>
    <sec id="sec-4">
      <title>5. Results</title>
      <p>The review of the existing approach to processing
images of the crystal structure of materials using
specialized software for analyzing TEM data is carried out.</p>
      <p>The analysis of the problem of estimating the
parameters of the crystal structure from the image of the
diffraction pattern of a material sample is carried out;
image processing methods suitable for automating this
task are identified. A number of possible modifications of
existing algorithms are proposed, which allow to process
such images in a partially automatic mode.</p>
      <p>The development of these modifications will make it
able to solve the problem of estimating the parameters of
the crystal structure without involving specialized
software.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>The work was supported by RFBR, Grant №
18-41700001.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Leutenegger</surname>
            <given-names>S. BRISK</given-names>
          </string-name>
          :
          <article-title>Binary Robust invariant scalable keypoints / S</article-title>
          . Leutenegger,
          <string-name>
            <given-names>M.</given-names>
            <surname>Chli</surname>
          </string-name>
          , R.Y. Siegwart // Proceedings of the 2011
          <source>International Conference on Computer Vision (ICCV '11)</source>
          .
          <article-title>6 November 2011</article-title>
          . P.
          <volume>2548</volume>
          -
          <fpage>2555</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Nebaba</surname>
            <given-names>S.G.</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>
          S.G. Nebaba,
          <string-name>
            <surname>A</surname>
          </string-name>
          .A. Zakharova // SPIIRAS Proceedings.
          <year>2017</year>
          . Vol.
          <volume>52</volume>
          . P.
          <volume>157</volume>
          -
          <fpage>179</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Schettini</surname>
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Underwater Image</surname>
          </string-name>
          <article-title>Processing: State of the Art of Restoration and Image Enhancement Methods /</article-title>
          R. Schettini, S. Corchs //
          <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. A Hybrid</given-names>
          </string-name>
          <string-name>
            <surname>Binarization Technique for Document Images</surname>
            / V. Sokratis, E. Kavallieratou,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Paredes</surname>
          </string-name>
          , K. Sotiropoulos // In: Biba M.,
          <string-name>
            <surname>Xhafa</surname>
            <given-names>F</given-names>
          </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>
          . Springer, Berlin, Heidelberg.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Alhadidi</surname>
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Mammogram Breast Cancer Image Detection Using Image Processing Functions / B. Alhadidi</surname>
            ,
            <given-names>M.H.</given-names>
          </string-name>
          <string-name>
            <surname>Zu'bi</surname>
            ,
            <given-names>H.N.</given-names>
          </string-name>
          <string-name>
            <surname>Suleiman</surname>
          </string-name>
          . // Information Technology Journal.
          <year>2007</year>
          . Vol.
          <volume>6</volume>
          . №. 2. P.
          <volume>217</volume>
          -
          <fpage>221</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Sivkov</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <article-title>Deposition of a TiC/Ti coating with a strong substrate adhesion using a high-speed plasma jet / Sivkov,</article-title>
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Shanenkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            ,
            <surname>Pak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Gerasimov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Shanenkova</surname>
          </string-name>
          , Y. // Surface and
          <string-name>
            <given-names>Coatings</given-names>
            <surname>Technology</surname>
          </string-name>
          .
          <year>2011</year>
          . Vol.
          <volume>291</volume>
          . P. 1-
          <fpage>6</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Gatan</given-names>
            <surname>Microscopy Suite Software</surname>
          </string-name>
          [Electronic Source]. URL: https://www.gatan.com/products/temanalysis/gatan-microscopy
          <string-name>
            <surname>-</surname>
          </string-name>
          suite-software.
          <source>(Last accessed: 11.06</source>
          .
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <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>
          <string-name>
            <surname>Automated</surname>
          </string-name>
          <article-title>Algorithm for Determining the Interplanar Distances of the Crystal Structure of a Substance from Transmission Electron Microscopy Images /</article-title>
          / CEUR Workshop Proceedings.
          <year>2019</year>
          . Vol.
          <volume>2485</volume>
          . pp.
          <fpage>248</fpage>
          -
          <lpage>251</lpage>
          . DOI:
          <volume>10</volume>
          .30987/graphicon-2019
          <source>-2-248-251</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Gonzalez</surname>
            <given-names>R.C.</given-names>
          </string-name>
          <string-name>
            <surname>Digital Image Processing (3rd Edition) / R.C. Gonzalez</surname>
          </string-name>
          , R.E. Woods // Prentice-Hall, Inc., Upper Saddle River, NJ, USA,
          <year>2006</year>
          . P.
          <volume>976</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <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</article-title>
          methods // Scientific Visualization.
          <year>2019</year>
          . Vol.
          <volume>11</volume>
          (
          <issue>2</issue>
          ). pp.
          <fpage>88</fpage>
          -
          <lpage>98</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <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 // Scientific Visualization</article-title>
          .
          <year>2019</year>
          . Vol.
          <volume>11</volume>
          (
          <issue>3</issue>
          ). pp.
          <fpage>80</fpage>
          -
          <lpage>91</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>