**3. Results**

From the series of blood flow images (Figure 4a), we could calculate the intensity of blood volume changes as the ratio of high- and low-frequency spectral components in the Fourier spectrum. Thus, we obtained the vessel image. It vividly depicts the tissues associated with cardiac activity, i.e., the spatial structure of the cardiovascular system existing at this developmental stage (Figure 4b). The heart and the system of vessels that carry blood throughout the embryo's body may be clearly identified on the blood-free background [32,38,39]. The calculated vessel image in Figure 4b demonstrates the efficiency of the proposed processing algorithm and shows the main elements of the existing cardiovascular system. Vessels are named according to commonly used classification [40]: ACeV—anterior cerebral

vein; BA—basilar artery; CA—caudal artery; CaDI—caudal division of the internal carotid artery; CCV—common cardinal vein; CV—caudal vein; DA—dorsal aorta; MsA—mesencephalic artery; MsV—mesencephalic vein; PCV—posterior cardinal vein; PHBC—primordial hindbrain channel; PHS—primary head sinus; PICA—primitive internal carotid artery; PMBC—primordial midbrain channel; PMsA—primitive mesencephalic artery; PPrA—primitive prosencephalic artery.

**Figure 4.** Example of cardiovascular data extraction using the proposed algorithm: (**a**) blood flow images, (**b**) vessel image, (**c**) the selected heart area, (**d**) the selected vessel area, (**e**) offset vector field examples, (**f**) the detected vessel central line, (**g**) cardiac signal and blood flow velocity examples, (**h**) cardiac signal spectrum, (**i**) blood flow velocity range and average value.

Besides the two-dimensional mapping of cardiac activity, the obtained spatiotemporal data cube *<sup>I</sup>*(*x,y,<sup>t</sup>*) allowed calculation of the heartbeat rate and blood flow velocity—quantitative parameters characterizing cardiovascular functioning. The heart location (Figure 4c) could be detected automatically as the image pixel group demonstrating the most intensive and constant oscillations. Heart area detection in the blood flow images allowed accurate cardiac beat detection and heart rate monitoring. The obtained temporal signals in the heart area had the correct shape and spectrum [30,34]. In the experiment shown in Figure 4, the measurement result for the heart rhythm was 69 bpm (Figure 4h), which is in good agreemen<sup>t</sup> with the values obtained in other studies for this stage of zebrafish development [36,41].

Pulsatile flow of blood cells could be easily detected in zebrafish embryo blood vessels from the beginning of circulation at 24 hpf. To demonstrate blood flow velocity measurement, we selected one of the vessel areas (Figure 4d) and carried out its morphological analysis in order to detect the offset vector field (Figure 4e) and central line of the vessel (Figure 4f) and to calculate normal direction at each point. Implementation of this procedure allowed the alignment of the pixels corresponding to the blood vessel into a straight line [42] to calculate the blood flow velocity. Since the blood vessel pixels were aligned, the relative shift between consequent images could be estimated. Then the blood flow velocity could be determined as the ratio of this shift to the time interval between the moments of image acquisition. The obtained blood flow velocity signal was compared with the temporal signal in the heart area to validate the proposed velocity measurement technique. In the diagram in Figure 4g, the curves corresponding to these signals are superimposed so that their mean values are equal. Heart area temporal signal and blood flow velocity signal had the same period of 0.86 s and a constant relative temporal shift of 0.35 s. Average blood flow velocity was 389 μm/s, which is close to the value measured using quantitative fluorescent imaging at the larval stage (Figure 4i) [24].

We implemented the described image processing algorithms in C++ using parallel computing on multiple CPU cores. The software includes modules for camera control and image acquisition, preprocessing and data analysis. The total processing time of 3000 12-bit monochrome images with 1200 × 1200 resolution was about 12 min using Intel's 8th generation 4-core processor. The most time-consuming processes were local matching (18 min) and vessel image calculation (1 min). Further optimization may be related to GPU computing.

Figure 5 illustrates the vessel activity across the whole embryo and the heart rate at the stages from 22 hpf to 27 hpf. Due to the absence of anesthesia, embryos moved and were randomly oriented in chorions. For this reason, the viewing angle and orientation of the embryos di ffered. Figure 5 shows temporal dynamics of the key features indicating the state of the embryos and suitability for non-invasive measurements at early developmental stages. The experiments demonstrated a continuous increase of the heartbeat rate and gradual activation of vasculature initiated by the heart functioning. Such measurements are important for predicting the further development of the embryo, in particular the time of its hatching.

**Figure 5.** Calculated vessel images (green rectangles indicate the detected heart area).
