<!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>Particles for PIV Analysis and Imaging Vortices on the Epicardial Surface</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Daria Mangileva</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexander Kursanov</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alena Tsvetkova</string-name>
          <email>as.tsvetkova@mail.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olesya Bernikova</string-name>
          <email>bernikovaog@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexey</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ovechkin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maria Grubbe</string-name>
          <email>grubbe.me@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jan Azarov</string-name>
          <email>j.azarov@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leonid Katsnelson</string-name>
          <email>l.katsnelson@iip.uran.ru</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Cardiac Physiology, Institute of Physiology, Komi Science Center</institution>
          ,
          <addr-line>Pervomayskaya Street 50</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute of Immunology and Physiology</institution>
          ,
          <addr-line>Pervomayskaya Street 106, Ekaterinburg, 620049</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Syktyvkar</institution>
          ,
          <addr-line>167000</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Ural Federal University</institution>
          ,
          <addr-line>Mira Street 19, Ekaterinburg, 620002</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Image preprocessing for vector field building significantly affect the quality of the resulting information. It is especially relevant when it comes to tasks where there are no auxiliary markers in the video recordings. Such tasks include the study of the mechanical behavior of the epicardial surface on video recordings obtained on an open heart. In particular, this study aims to visualize the vortex-like mechanical movements that can occur on the heart during fibrillation. The knowledge gained about the deformation of the epicardial wall can help in better understanding the pathological processes. However, due to the intense movement of the heart and the presence of blood on surface, the application of the necessary small markers is rather difficult, and the use of luminous chemicals would harm physiological functioning. Moreover, these videos contain motion artifacts that complicate further analysis with Particle Image Velocimetry. In this paper, an image preprocessing algorithm was proposed. It is based on approximate tracking individual fragments using the Mean Squared Error for the matrix. The result is binary images where small points are built instead of each fragment. In this study, the proposed algorithm showed better results in comparison with the most suitable filtering methods for specific frames, namely, the Sobel filter and the Canny edge detector. This can be partially explained by the higher density of vector fields due to the absence of unreliable vectors. Thus, the proposed method, unlike others, allows to get vector fields with visible vortex-like mechanical movements.</p>
      </abstract>
      <kwd-group>
        <kwd>Keywords1</kwd>
        <kwd>PIV</kwd>
        <kwd>preprocessing</kwd>
        <kwd>vortex</kwd>
        <kwd>heart surface</kwd>
        <kwd>filtering</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Ventricular fibrillation (VF) often complicates myocardial infarction and results in sudden cardiac
death. VF prediction and prevention constitutes an important research challenge. Despite important
insights into arrhythmogenesis have been provided (Varró et al., 2021) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], this problem remains largely
unsolved thus far, which warrants further studies of VF mechanisms. One of probably underestimated
arrhythmogenic mechanisms might be mechanical interaction between ischemic and normal tissues that
can cause multiple proarrhythmic changes via a so-called mechanoelectrical feedback. A method of
assessment of mechanical interaction between adjacent myocardial regions in vivo is needed for the
evaluation of this phenomenon. Such a method should be free of significant interventions that can affect
the functional myocardial properties.
a.kursanov@iip.uran.ru
(A.
      </p>
      <p>Tsvetkova);</p>
      <p>2021 Copyright for this paper by its authors.</p>
      <p>
        Particle Image Velocimetry (PIV) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] has become one of the most popular methods for various fields
of research that apply the analysis of the motion of various objects in video recordings. Since the
beginning of its active use and until now, this approach has been actively refined and today it has
software implementations, for example, in the MATLAB environment [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and the OpenPIV Python
library [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. In particular, this method can be used for assessing myocardial deformation [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The main
point of this method is that it measures particle flows by comparing two consecutive frames. If one
briefly describes this method, then at the beginning there is a cross-correlation between the given
interrogation windows. Interrogation window sizes and cross-correlation methods can vary. For the
most accurate motion estimation, the direct cross-correlation (DCC) algorithm is usually used [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
Figure 1 shows a simplified diagram of this algorithm.
      </p>
      <p>
        The main idea is that the interrogation window is set on the first frame (sub-image 1), and then on
the second frame. An area of the sub-image 1 size, which has the maximum correlation with sub-image
1, is searched for on the first frame within the large interrogation window (sub-image 2). The
twodimensional Gaussian regression method has proven itself well for determining the maximum in the
cross-correlation matrix [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. However, the study by Nobach and Honkanen [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] proved that this method
worked best for images with Gaussian-shaped particles. Therefore, in preparation for the PIV analysis,
various methods are used to ensure that the frames have an appropriate look. So, for example, a special
laser sheet is used to study the motion of particles in the fluid, which highlights them and facilitates the
preprocessing of frames [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Recently, however, PIV has become increasingly used to study the motion
of various surfaces. It should be noted that for this kind of research, expensive cameras with a high
frame capture rate are usually used to minimize motion artifacts, but they are not always available due
to limited financial resources [8]. Also, in many cases, auxiliary markers are used. They take on the role
of particles and contribute to the best detection of peaks in the cross-correlation matrix, but this is not
always possible [9, 10].
      </p>
      <p>The current study aims to obtain information using PIV analysis on the mechanical movement on
the ventricular epicardium of the pig heart in the presence of ischemia and VF. It is assumed that
electrical vortices, which cause VF, lead to viral mechanical movements, which may be reflected on
the epicardial surface.</p>
      <p>In this paper, preprocessing algorithm was proposed, partially inspired by the DCC algorithm, which
can improve the quality of the information obtained from the video recordings of the experiment,
without resorting to the application of small markers, the use of glowing chemicals and expensive
cameras.</p>
    </sec>
    <sec id="sec-2">
      <title>Materials and methods</title>
      <p>All programming operations performed in this study were applied using the Python programming
language. For reproducibility of the experiment results, programs and video files were uploaded to the
GitHub.
2.1.</p>
    </sec>
    <sec id="sec-3">
      <title>Experiment description</title>
      <p>The study conformed to the Guide for the Care and Use of Laboratory Animals, 8th Edition
published by the National Academies Press (USA) 2011, the guidelines from Directive 2010/63/EU of
the European Parliament on the protection of animals used for scientific purposes and was approved by
the ethical committee of the Institute of Physiology of the Komi Science Centre, Ural Branch of Russian
Academy of Sciences.</p>
      <p>The experiment was performed in a male pig (36.5 kg body weight, 2 months old). The animal was
anesthetized with zoletil (ZOLETIL® 100, Virbac S.A., Carros, France,10–15 mg/kg, i.m.), xylazine
(Interchemie, Castenray, Netherlands, 0.5 mg/kg, i.m.) and propofol (Norbrook Laboratories Ltd.,
Newry, Northern Ireland, UK, 1 mg/kg, i.v.), intubated and mechanically ventilated. The heart was
accessed via a midsternal incision. Myocardial ischemia was induced by occlusion of the left anterior
descending coronary artery just distal to the first diagonal branch origin. Limb lead ECGs were
continuously recorded throughout the experiment in order to control ECG parameters and arrhythmias
development. Small angular markers were placed on the epicardium of the ventricles for analysis of the
ventricular surface movements. Markers were distributed over the epicardial surface as uniformly as
possible, covering both normally perfused and ischemic areas. The video registration of anterior wall
movement of the heart was done before coronary occlusion and during ischemia until VF developed in
the first minute, after which the animal was euthanized under deep anesthesia by an intravenous
potassium chloride injection.</p>
      <p>A video recording of the pig's open heart was made on a single-lens reflex camera with a relatively
low frame capture rate (50 frames per second). Considering that the contraction of the heart is quite
intense, there are motion artifacts in these videos. Moreover, to obtain more detailed information on the
mechanical behaviour of the epicardial surface, it is necessary to use smaller interrogation windows for
the DCC algorithm. Therefore, in this case, it is necessary to apply more small markers located quite
close to each other, but this is troublesome due to the constant presence of blood on the surface of the
heart. Thus, this task requires a more thorough preprocessing of frames.
2.2.</p>
    </sec>
    <sec id="sec-4">
      <title>Preprocessing algorithm</title>
      <p>
        Since it has already been proven that two-dimensional Gaussian regression works best on images
with clearly defined Gaussian-shaped particles [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the main purpose of this preprocessing is to bring
frames to such a form. The first frame of the video of the experiment was divided into a grid in the
region of the heart, which was determined manually. Given the movement of the heart during
contractions, the area of interest was slightly less than the surface area of the epicardium. The cell size
was 16x16 pixels. Figure 2 shows an image of a heart with a superimposed virtual mesh.
      </p>
      <p>A point was drawn in the center of each cell. Next, each of these cells was monitored using a simple
proposed algorithm. The essence of this approach is that on the next frame cell “B” is built (Figure 3)
located in the same place as cell “A”, but the size of cell “B” is 32x32. Next, a 16x16 square “A′ ” is
built around each point of cell “B” and it is compared with cell “A” using the Mean Squared Error
(MSE) for the matrix [11] (1)</p>
      <p>MSE =
1
k
n m
∑ ∑‖Ai,j − A′i,j‖
i=0 j=0
2
(1)</p>
      <p>It is worth noting that since the input images were in the RGB format, the final MSE was calculated
as an average across all channels.</p>
      <p>The coordinates of the center of the cell corresponding to the smallest value of the standard deviation
were recorded. Then the algorithm was repeated according to the same principle, but concerning the
newly selected point. The algorithm scheme is shown in Figure 3.</p>
      <p>An example of the image obtained after the above procedure is shown in Figure 4.</p>
    </sec>
    <sec id="sec-5">
      <title>Selection of filtering methods for comparison with the proposed algorithm</title>
      <p>Since the preprocessing method described above is computationally expensive, it must be justified
by comparing it with the most suitable classical filtering for these frames. Figure 5 shows the image of
the same frame after different filtering. For this study, various filters were selected, such as a threshold
filter [12], median filter [13], Gaussian filter [14], Canny edge detection [15], and Sobel filter [16]. It
should be noted that the filter parameters, and in particular the value of the subsequent threshold
filtering and Gaussian (sigma) for Canny edge detection, were chosen optimally for a specific task.</p>
      <p>It is obvious from Figure 5 that Canny edge detection and the Sobel filter are best suited for this
task, since it is necessary to visualize the phenomena occurring on the entire surface of the epicardium,
and the threshold filter, median filter, and Gaussian filter lead to a significant loss of information. Since
only information about the epicardium remains on the image in the method described in the previous
paragraph, for the purity of the experiment, a mask was applied to all filtered frames in such a way that
the entire image area except for the heart became black.
second largest peak, then these vectors were determined as unreliable and were reset to zero.
2.5.</p>
    </sec>
    <sec id="sec-6">
      <title>Estimating a vector field with the Swirling Strength Criterion</title>
      <p>To compare several preprocessing methods over the entire period of the experiment, the maximum
Swirling Strength Criterion (SSC) developed by Zhou et al. (1999) [17] and having a software
implementation in the Vortex Fitting software package [18] was calculated. It defines a vortex core to
be the region where D̄ has complex eigenvalues. It is based on the idea that the velocity gradient tensor
in Cartesian coordinates can be decomposed as follows (2):
 ̅ = [      ] | 0
 
0
0
 
− 
0
  | [</p>
      <p>]
(2)
where   is the real eigenvalue related to the eigenvector   ,
  ±   is the complex conjugate pair of complex eigenvalues related to the eigenvectors   ±   
The strength of this swirling motion can be quantified by   , which is called the local swirling.</p>
      <p>The SSC value is capable, in a sense, of numerically assessing the severity of the vortex, since it
was originally invented for their detection. This criterion also affects the size of the current vortex [17].
However, it should be noted that the presence of any twists in the vector field, particularly the
mechanical phenomena that arise during the natural contraction of the heart, should also have some
value of the SSC [17]. However, in the presence of fibrillation, more pronounced swirling should appear
on the vector field, which in theory should lead to an increase in SSC [17].</p>
      <p>To identify a more global trend in SSC changes, the graphs were smoothed using a moving average
[19] equal to 8 seconds (400 frames).</p>
    </sec>
    <sec id="sec-7">
      <title>Results</title>
    </sec>
    <sec id="sec-8">
      <title>Conclusions</title>
      <sec id="sec-8-1">
        <title>Proposed method 0.31</title>
      </sec>
      <sec id="sec-8-2">
        <title>Canny edge detector 0.23</title>
      </sec>
      <sec id="sec-8-3">
        <title>Sobel filter 0.25</title>
        <p>The method proposed in this article improves the quality of the analysis of vector fields obtained
using PIV. This can be seen from the graph in Figure 6. The curve obtained using this method is located
higher than others. Thus, the probability of vortex detection [17] increases due to the higher SSC value.
Moreover, it has the highest sensitivity judging by the values in Table 2. This can be explained by the
fact that the vector fields built on these preprocessed images have a higher density due to the absence
of unreliable vectors (Table 1). From the graph in Figure 6, Table 1, and Table 2, one can see that the
density of the vector field directly affects the level of the SSC value and the sensitivity of the graph
after occlusion. Thus, the best results are obtained with the proposed method, the next is the Sobel filter,
then comes the Canny edge detector and raw video. On this basis, this study confirms the fact that the
two-dimensional Gaussian regression method works best on black and white images with particles.
Though this method can give errors, even with the subsequent use of DCC analysis and two-dimensional
Gaussian regression, one can see in Figure 7 that the vector fields built on images preprocessed using
this method look quite harmonious compared to other vector fields. Moreover, it is possible to visually
discern vortices on them, especially at points 2 and 4. The vortices at points 3 and 5 on the vector fields
are less noticeable. This can be explained by the limitations of the proposed method by the size of the
virtual grid (Figure 2). Thus, one can conclude that this method can be used for solutions of such
problems without additional aids.</p>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>Acknowledgements</title>
      <p>The study was supported by Grant No. 21-14-00226 of the Russian Science Foundation
Supercomputer URAN of IMM UrB RAS was used for calculations.
velocimetry, Experiments in Fluids 38 (2005): 511–515. doi:
http://dx.doi.org/10.1007/s00348005-0942-3
[8] A. Nemes, T. Dasari, J. Hong, M. Guala, F. Coletti, Snowflakes in the atmospheric surface layer:
observation of particle-turbulence dynamics, Journal of Fluid Mechanics 814 (2017): 592. doi:
https://doi.org/10.1017/jfm.2017.13
[9] K. Kuok, P.C. Chiu, Application of particle image velocimetry (PIV) for measuring water velocity
in laboratory sedimentation tank, IRA International Journal of Technology &amp; Engineering 9(3):
16–26 (2017). doi: http://dx.doi.org/10.21013/jte.v9.n3.p1
[10] C.J. Legleiter, P.J. Kinzel, Surface flow velocities from space: Particle image velocimetry of
satellite video of a large, sediment-laden river, Frontiers in Water 3 (2021). doi:
https://doi.org/10.3389/frwa.2021.652213
[11] A. Mood, F. Graybill, D. Boes, Introduction to the Theory of Statistics, 3rd ed., McGraw-Hill,
1950, p. 229.
[12] L. Shapiro, G.C. Stockman, Computer Vision, Prentice Hall, 2002.
[13] R. Boyle, R. Thomas, Computer Vision: A First Course, Blackwell Scientific Publications, 1988,
pp. 32–34.
[14] H.J. Blinchikoff, A.I. Zverev, Filtering in the Time and Frequency Domains, SciTech Publishing,
(2001). doi: https://doi.org/10.3986/ac.v48i2.7269
[15] J. Canny, A computational approach to edge detection, IEEE Transactions on Pattern Analysis and</p>
      <p>Machine Intelligence 8(6) (1986): 679–698. doi: 10.1109/TPAMI.1986.4767851
[16] R. Duda, P. Hart, Pattern classification and scene analysis, John Wiley and Sons, 1973, pp. 271–
272. doi: 10.2307/2286028
[17] J. Zhou, R.J. Adrian, S. Balachandar, T.M. Kendall, Mechanisms for generating coherent packets
of hairpin vortices in channel flow, Journal of Fluid Mechanics 387 (1999): 353–96. doi:
http://dx.doi.org/10.1017/s002211209900467x
[18] G. Lindner, Y. Devaux, S. Miskovic, VortexFitting: A post-processing fluid mechanics tool for
vortex identification, SoftwareX 12 (2020): 100604. doi: 10.1016/j.softx.2020.100604
[19] Y.L. Chou, Statistical Analysis, Holt International, 1975, section 17.9.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Varró</surname>
          </string-name>
          ,
          <string-name>
            <surname>András</surname>
          </string-name>
          , et al.
          <article-title>"Cardiac transmembrane ion channels and action potentials: cellular physiology and arrhythmogenic behavior."</article-title>
          <source>Physiological Reviews 101.3</source>
          (
          <year>2021</year>
          ):
          <fpage>1083</fpage>
          -
          <lpage>1176</lpage>
          . doi: https://doi.org/10.1152/physrev.00024.2019
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R.J.</given-names>
            <surname>Adrian</surname>
          </string-name>
          ,
          <article-title>Particle-imaging techniques for experimental fluid mechanics</article-title>
          ,
          <source>Annual Review of Fluid Mechanics</source>
          <volume>23</volume>
          (
          <year>1991</year>
          ):
          <fpage>261</fpage>
          -
          <lpage>304</lpage>
          . doi: http://dx.doi.org/ 10.1146/annurev.fl.
          <volume>23</volume>
          .010191.001401
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>W.</given-names>
            <surname>Thielicke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.J.</given-names>
            <surname>Stamhuis</surname>
          </string-name>
          , PIVlab
          <article-title>- towards user-friendly, affordable and accurate digital particle image velocimetry in MATLAB</article-title>
          ,
          <source>Journal of Open Research Software</source>
          <volume>2</volume>
          (
          <year>2014</year>
          )
          <article-title>: e30</article-title>
          . doi: http://dx.doi.org/10.5334/jors.bl
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4] OpenPIV Group,
          <article-title>OpenPIV: a python package for PIV image analysis</article-title>
          ,
          <year>2014</year>
          . URL: https://openpiv.readthedocs.io/en/latest/
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Jacob</surname>
            , Athira,
            <given-names>Ganapathy</given-names>
          </string-name>
          <string-name>
            <surname>Krishnamurthi</surname>
            , and
            <given-names>Manikandan</given-names>
          </string-name>
          <string-name>
            <surname>Mathur</surname>
          </string-name>
          .
          <article-title>"Estimation of myocardial deformation using correlation image velocimetry."</article-title>
          <source>BMC medical imaging 17.1</source>
          (
          <year>2017</year>
          ):
          <fpage>1</fpage>
          -
          <lpage>13</lpage>
          . doi: https://doi.org/10.1186/s12880-017-0195-7.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>H.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Dabiri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gharib</surname>
          </string-name>
          ,
          <article-title>On errors of digital particle image velocimetry</article-title>
          ,
          <source>Measurement Science and Technology</source>
          <volume>8</volume>
          (
          <year>1997</year>
          ):
          <fpage>1427</fpage>
          -
          <lpage>1440</lpage>
          . doi: http:// dx.doi.org/10.1088/
          <fpage>0957</fpage>
          -0233/8/12/007
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>H.</given-names>
            <surname>Nobach</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Honkanen</surname>
          </string-name>
          ,
          <article-title>Two-dimensional Gaussian regression for sub-pixel displacement estimation in particle image velocimetry or particle position estimation in particle tracking</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>