Determination of Blood Flow Characteristics in Eye Vessels in Video Sequence

Accurately measuring blood flow in eye is an important challenge, as blood flow reflects the health of eye and is disrupted in many diseases. Existing techniques for measuring blood flow are limited due to the complex assumptions and calculations required. Digital image and video processing techniques started to be used for eye vessels analysis and evaluation during last decades. In this paper, we propose a method for determining the characteristics of blood flow in the vessels of eye conjunctiva, such as linear and volumetric blood speed, and topological characteristics of vascular net. The method first analyses image frame by frame sequentially and then builds integral optical flow for video sequence. Dynamic characteristics of eye vessels are introduced and calculated. These characteristics make it possible to determine changes in blood flow in eye vessels. We show the efficiency of our method in real eye vessels scenes.


Introduction
The study of conjunctiva vessels allows to perform a direct non-invasive study of vessels of a microcirculatory bed. The change in the quantitative dynamic characteristics of blood flow in the conjunctival vessels determines the change in blood flow in a microvascular bed and reaction of a vascular bed to the effects of various therapeutic drugs. It appears in narrowing or dilation of blood vessels, increasing degree of branching, the expansion of a capillary network.
Currently, there are many methods for blood flow monitoring, such as Doppler ultrasonography and Velocimetry, laser Doppler flowmetry, and blood vessels measurement by portable devices [1,2]. Volumetric blood flow speed is usually computed as the product of linear blood speed and vessel cross-sectional area, each measured independently. Vessel diameter can be measured from conjunctiva images by using the retinal vessel analyzer or the scanning laser ophthalmoscope, or by using confocal line scans. Speed can be measured with bidirectional laser Doppler velocimetry and frequency domain optical coherence tomography [3].
However, most of the methods allow to determine the parameters of blood flow only in straight sections of the microvascular bed, while the changes occurring in the nodes and complex fragments of the vascular network remain unaccounted for. In addition, the use of these methods in clinical studies is limited due to the high cost and complexity of result interpretation.
The image of eye circulatory system is a network of vessels of different shapes, sizes, orientations and brightness. The location of vessels allows to get a fairly clear image without gross distortion. However, in the study of these images there are some difficulties, some of them are typical for vessels of any part of a circulatory system, others -only for vessels of eye circulatory system.
The first problem that arises when obtaining a video sequence is caused by image instability. For a healthy human, eye is characterized by saccadic eye movements, which are rapid jumps of different duration and amplitude from one point of fixation to another, as well as eye tremor of different intensity, depending on the state of human health. When receiving such images, it is impossible to fix an object. Thus, mixing of vessel positions between two frames is chaotic. Therefore, at this stage, the most important task is to stabilize a video sequence.
The second problem is to determine the structure of conjunctiva circulatory system. It is a structure with complex geometry, which is characterized by a large number of vessels with bends and branches. The vessel is a complex three-dimensional structure and we have to take into account changes in shape, size and brightness. Branching and intersecting vessels also complicate the task of segmentation.
The third problem is related to changes in the shape and geometric characteristics of vessels due to the fact that vessel is an elastic object, and its geometrical parameters change with blood filling during a cardiovascular cycle. To reduce the measurement error, a vessel diameter should be determined at the time of the lowest blood filling of the vessel. Also, in addition to the average geometry parameters and blood flow volumetric speed, it is necessary to take into account the vessel instantaneous characteristics.
The fourth problem is the complexity of describing sequence of events occurring in the vessel due to periodic changes in the parameters describing the blood flow in conjunctival vessels.
To obtain images of the conjunctiva, a monochrome camera equipped with a laser device for guidance and focus is used. Despite the use of pulse illumination synchronization devices, the obtained images have low quality and resolution, which leads to the need to use complex methods of image analysis.
Most of the existed methods process eye vessels in single static images. However, blood flow characteristics can be only computed by using sequence of images or video sequence and special techniques should be elaborated for this task.
In this paper, we propose a method for determining the characteristics of blood flow in the vessels of eye conjunctiva, such as linear and volumetric blood speed, topological characteristics of vascular net. The method first analyses image frame by frame sequentially and then builds integral optical flow for video sequence. Dynamic characteristics of eye vessels are introduced and calculated. These characteristics make it possible to determine changes in blood flow in eye vessels. We show the efficiency of our method in real eye vessels scenes.

Review of eye vessels image analysis approaches
Image and video processing techniques started to be used for eye vessels analysis during last decades. It allows to organize an efficient permanent control of eye state and define the corresponding treatment. On the other hand, it requires advanced techniques for image and video processing. Methods of eye vessels image analysis are considered in many papers. The first reviews of algorithms for processing of vascular structures can be seen in [4,5]. The review [4] presented an analysis and categorization of literature related to digital imaging technologies in the field of diabetic retinopathy and focused on algorithms and methods of segmentation of two-dimensional color retina images that are received with the help of fundus cameras.
Authors in paper [6] presented a comparative overview of methods and algorithms for isolating vessels and elongated objects on both two-dimensional and threedimensional medical images used in various tasks. A review of the algorithms for segmentation and registration of the retina is presented in paper [7], that is mainly devoted to tasks of detecting boundaries and central lines of the vessels. Paper [8] provides an overview of algorithms primarily focused on the isolation of vessels on two-dimensional color images of retina obtained with fundus cameras or fluorescent angiography, and focused on studies related to segmentation of blood vessels of retina.
From recent results, we can indicate paper [9], where authors propose a novel contextual method for analysis of vessel connectivities based on the geometry of the primary visual cortex. Using the spectral clustering on a large local affinity matrix constructed by both the connectivity kernel and the feature of intensity, the vessels are identified successfully in a hierarchical topology each representing an individual perceptual unit. Paper [10] presents an algorithm for segmenting and measuring retinal vessels, by growing an active contour model, which uses two pairs of contours to capture each vessel edge, while maintaining width consistency. The algorithm is initialized using a generalized morphological order filter to identify approximate vessels centerlines. Once the vessel segments are identified, the network topology is determined using an implicit neural cost function to resolve junction configurations. Paper [11] proposes several methods for vessels image segmentation. One method uses Matched Filter (MF) for the extraction of blood vessels. This method responds not only to vessels but also to non-vessel edges. The second method is a novel hybrid automatic approach for extraction of retinal image vessels which reduce the weak edges and noise, and finally extract the blood vessels.
Vessels tracing is considered in many papers. Paper [12] proposes a novel graph-based approach to address this tracing with crossover problem. After initial steps of segmentation and skeleton extraction, its graph representation can be established, where each segment in the skeleton map becomes a node, and a direct contact between two adjacent segments is translated to an undirected edge of the two corresponding nodes. The segments in the skeleton map touching the optical disk area are considered as root nodes. This determines the number of trees to-be-found in the vessel network, which is always equal to the number of root nodes.
An automatic algorithm capable of segmenting the whole vessel tree and calculate vessel diameter and orientation in a digital ophthalmologic image is presented in paper [13]. The algorithm is based on a parametric model of a vessel that can assume arbitrarily complex shape and a simple measure of match that quantifies how well the vessel model matches a given angiographic image. An automated screening system to diagnose the retinal images affected by diabetic retinopathy is described in paper [14]. The proposed system consists of three stages: the pre-processing, which is done to make the image reliable for extracting features. In the second stage, features like area of blood vessels and texture features were extracted from the retinal images and classification the last stage was done using the ELM classifier. The very recent comprehensive overview for retinal vessels segmentation techniques is given in paper [15].
Most of the existed methods can segment and process retina cells in single static images, they are important for eye vessels analysis. However, blood flow characteristics can be only computed by using sequence of images or video sequence.

Video sequence capture and processing
A general scheme of video sequence processing and definition of blood flow speed in vessel is shown in Figure  1. Video sequence processing can be divided into several parts. Video capture constructs an image sequence for further processing. The first step of video processing is stabilization. Video stabilization is performed in the following way. The first frame in video sequence plays an important role in the whole process and it should be prepared in a specific way. The contrast of vessels in an image varies and is often quite low, so first it is necessary to manually define a fragment with a clear image of the vessel to search stable regions for it in subsequent frames. This search is performed through the analysis of field borders using the bitmap filter, for example, Sobel filter.
The search for the maximum brightness to determine the contrast begins at the center of the frame, because objects in the image can move in any direction in the next frame. The region of interest is defined as the sharpest fragment located as close to the center of image as possible. According to new positions of the selected fragment on the subsequent frames, the offsets relative to the first frame are calculated and intermediate images are created.
Intermediate images are used as the core of correlation to determine the coordinate offsets when stabilizing the video. Then, based on the calculation of the image shifts, video sequence frames are aligned and video sequence is stabilized. Stabilization ensures constant positions of vessels in each frame, which allows monitoring at each given coordinate.
The next processing block consist of two branches. The first branch is segmentation of vessels at image frame. The second is going for a limited set of neighboring images from sequence for flow speed determination. The

Image preprocessing and accumulation
Image preprocessing is used first to adjust image brightness, correct irregularities, suppress noise, and eliminate distortion. To do this, standard operations are used, for example, histogram equalization to increase the contrast of vascular images. Segmentation allows to select certain fragments in the image of the network of blood vessels. Then, numerical data on blood flow in the areas allocated during segmentation are estimated. The obtained data can be used to classify objects according to predefined criteria such as size, structure, and brightness. The next step is frame image segmentation, which allows to select fragments of blood vessels in the image. Blood vessels are objects, segmentation of which is quite difficult. This is due to numerous vascular occlusions, complex bends and branches, and variabilities of size and brightness of objects in the images. Furthermore, in video sequence, vessels are without blood filling in some frames, which makes the vessels invisible in these frames.
For improving the quality of segmentation, the structure of vessels needs to be determined. Segmentation is performed on a synthesized image that corresponds to the normalized integral sum of all video sequence frames. To obtain it, the accumulation of images is performed.
The accumulated image is then used to improve the image of vessels before segmentation. This is done by averaging this image with the current image frame: where is the brightness of the intermediate image; is the number of frames that have already been processed; is the current image. The advantage of the synthesized image is the absence of fragments of blood vessels, not filled with blood. As a result, all vessels became visible and thus it is possible to highlight them.

Segmentation by convolutional neural network
In every day medical practice, image segmentation is usually performed manually by doctors, which is timeconsuming and tedious. However, the ever-increasing quantity and variety of medical images make manual segmentation impracticable in terms of cost and reproducibility. Therefore, automatic medical image segmentation is highly desirable. However, images with vessels of eye conjunctiva are very complex due to complex variations in objects and structures and because of low contrast, noise, and other imaging artifacts caused by various imaging modalities and techniques.
Automatic image segmentation methods started to widely be used in the last few years for medical images. These methods achieve promising results on nonmalignant objects using hand-crafted features and prior knowledge of structures. However, the automatic segmentation of eye vessels images does not give desirable result and usually interactive (manual) postprocessing should be used.
Recently neural networks, particularly fully convolutional networks, have been proved highly effective for medical image segmentation, which require little hand-crafted features or prior knowledge. Neural networks might be able to take the position, size, shape, intensity, etc. and do a better job of figuring out where the required objects are in an image compared to simply applying morphological operations or other segmentation methods. With strong use of data augmentation, this segmentation model achieves significant improvement over previous methods.
The method of teaching a convolutional neural network (CNN) with a sliding window was used in our study. This technique makes it possible to predict the class label for each pixel, based on the pattern selected around it, according to [16,17]. That is, a small area around the pixel is used as the source data. To solve the problem of vascular network segmentation, a fully connected convolutional neural network was used. The peculiarity of its organization is that the usual convolution network is supplemented with layers in which the union operators are replaced by operators of increasing discretization, which leads to an increase in the resolution of the output image. Combining features with higher resolution from a narrowing area with an expanding output area allows to train convolutional layers to form a more accurate result at the output.
A set of 130 gray-scale images of eye sclera using a GigE camera was used to train the neural network ( Figure  2). The SNA architecture proposed during the isbi 2012 EM Segmentation Challenge (Segment Neural Membranes) was used [17]. Neural network training was performed on a set of images, which was increased by simple geometric augmentation to 650 synthetic images.
The training took place on the NVIDIA GTX GPU. The training lasted for 500 epochs. All regions containing vessel in the center and other regions without vessel in the center with the same size were selected from each of the input sample images (Figure 3). The optimization method for CNN is a stochastic gradient descent. The network output is the probability for each vessel from 0 to 1, where 0 stands for vessel, 1 stands for non-vessel.
When the amount of data increases, neural network is retrained to detect vessels. This means that it is necessary to submit more teaching images, without a vessel in the center. It is especially important to include images where the center pixel lies near the vessel, but does not belong to it, so that the network learns to identify borders of the vessel. At the same time, it is important to allow mixing of any subset of the training data. The number of objects of class 0 and 1 must be identical.
Let us define number of all patterns containing the vessel in the center is V, and number of all patterns without the vessel in the center is NV. Then, in the teaching process, only N patterns from those NV patterns are randomly determined. It allows to use a larger set of data without increasing the load on the neural network and avoid network retraining. On this basis, the neural network becomes more flexible. As a result, the quality of segmentation has increased.
The network architecture is shown in Figure 4. It consists of two almost symmetrical parts: narrowing left and expanding right.
The narrowing part corresponds to the typical architecture of SNA and consists of two sequentially applied convolution blocks of size 3x3 (no indent). Each block is a ReLU layer and the operation of subsampling (2x2 max pooling) with step 2 decreases the image size. After each decrease in the dimension, the number of features is doubled. Every step of the growing branch consists of research layers (convolution 2x2 to increase the resolution) and formed on their basis a set of attributes, which reduces by half the number of signs.
The neural network has 23 convolutional layers, to bring each 64-component vector to the required number of classes, convolutions of 1x1 size are applied on the last layer. The size of the input image is determined by the need for even values of height and width for the proper operation of subsampling (2x2 max pooling).
Then, there is a concatenation with the corresponding set of features from the narrowing part, and two 3x3 convolutions are performed, each of which is followed by a transformation through the ReLU activation function [16]. The neural network with this architecture has demonstrated good results for the segmentation of blood vessels in ophthalmology.
Usually this neural network requires a long teaching time, but it can be compensated by the high segmentation rate of the trained network. Full HD (1920 x 1080) image resolution on the NVIDIA GTX 950 GPU takes less than 10 seconds to fully segment, which is acceptable for medical image processing.

Segmentation results
As a result of segmentation based on convolutional neural networks, the image of the vascular network is obtained ( Figure 5).
We used standard deviation and accuracy mark for estimation of effectiveness of this algorithm [5]. Standard deviation is calculated as: where is pixel number, x is result label (0 or 1), ̅probability result. Accuracy is normalized number of true answers. Estimation of segmentation effectiveness is shown in Table 1. As it is shown, the CCN-based segmentation algorithm allows to extract regions of vessels from gray-scale image with high quality. Our experiments proved that convolutional neural networks can be successfully used to segment such complex images as images of vessels at eye sclera. Determination of Blood Flow Characteristics in...

Blood flow characteristics calculation by using optical flow
Segmentation still has errors and blood flow speed has all sorts of boundary effects, so we try to avoid this by limiting area of objects. In this case, the optimal vessel region for analysis is a middle line of a vessel that is obtained by thinning operation. After segmentation is performed, the instantaneous linear speed at each point of vessel is determined. To do this, the method based on optical flow is used. Therefore, when preparing the image of vascular network for calculation of optical flow, its thinning is first performed. For analysis of blood flow speed, the optical flow is determined only for the part of the image directly containing vessels. Resulting video sequence displays all the changes occurring in vessels. Such a transformation can significantly reduce the contribution of events occurring outside the vessels. The calculation of the optical flow for points along the midline of the capillary allows to analyze the instantaneous linear speed in the center of the vessel. (Figure 6). a) b) Figure 6: Image of vessels a) source image, b) image with a skeleton after thinning.

Optical flow determination
For description convenience, we use to denote -th frame of video and ( ) to denote pixel with coordinate = ( , ) in . Let denote basic optical flow of . It is a vector field with each vector ( ) represents displacement vector of pixel ( ). Assume ( ) = ⃗ , we can easily determine the coordinate in +1 where pixel ( ) moves, and it is + ⃗ .
Considering optical flows for several consecutive frames have been computed, we can obtain integral optical flow for the first frame of those. Let denote integral optical flow of , where is the frame interval parameter used to compute integral optical flow [18].
is also a vector field which records accumulated displacement information in time period of frames for all pixels in .
For any pixel ( ) , its integral optical flow ( ) can be determined as follows: where + is the coordinate in + of pixel ( ). In other words, if ( ) stays in the video scene, This method allows us to estimate the displacement at each point of the image between two frames of the video sequence and is based on the determination of the intensity shift for a short period of time. After the segmentation process, the images are processed using a binary mask of the vascular network. This operation is performed on the basis of masking with skeleton of vascular network with images of each frame of video sequence. This makes it possible not to take into account the change in brightness in the vicinity of the vessel when calculating the optical flow throughout the image. After vessels image thinning, analysis of its midline neighborhoods is performed, and the optical flow is calculated. To compute the optical flow, the algorithm [19] was used. As a result, an array of vectors for the vertical and horizontal speed components are calculated (Figure 7a). With the help of the polar transformation, amplitudes and directions of these vectors are determined (Figure 7b).

Blood
Then, a new image, in which intensity corresponds to the magnitude and hue corresponds to the direction of optical flow vector, is created. To determine the speed of blood flow, only the magnitude (amplitude) is used. Thus, one can build a profile of the speed values along the midline of the skeleton (Figure 8). This profile represents a change in blood instantaneous linear speed for any point on the middle line of the vessel (Figure 9).
Problems related to the discretization of time and space make it difficult to use absolute values. The optical flow values were used to determine the instantaneous linear speed, which was measured in relative units. The volumetric speed of blood flow in the capillary depends on its width, it can be calculated by the formula: where is the linear speed of blood flow, is the volumetric speed, is the cross-section area of the vessel.
A cross-section area of the vessel is calculated from width vessel as: where is diameter of vessel in separate point. Diameter corresponds to width of vessel. Determining the width of the vessel is a complex task due to unstable diameter of a blood vessel section. Currently, there is no algorithm for qualitative construction of the distribution of vascular width. In this study, we determine a distribution of width based on distance map (Figure 10) analysis. It allows to determine the width change along vessels. It allows to get important practical information about the features of the blood flow through the vascular network, taking into account its geometric complexity. The speed of blood flow in a vessel and its diameter are used to determine the instantaneous changes occurring in the vessel. Additionally, determination of speed based on optical flow and vessel width can be performed in parallel, which help reduce computational cost.

Determination of topological characteristics of vascular net
Vessel segments are characterized by width, length and blood flow speed. Diameter and speed are obtained by averaging results of multiple adjacent blood vessel speed profiles. Other hemodynamic parameters can be calculated by topological description.
On the base of above-described automatic segmentation and morphological identification, the skeleton of the conjunctiva vascular net is detected, and branch points of the vessels are automatically indicated. The following parameters are calculated for vascular net: length, branchiness, compactness, and tortuosity, based on determination of the skeleton structure including nodes, segments and tails ( Figure 12). It is known that in some pathologies the tortuosity of eye vessels increases. Analysis of the topology of the vascular net is performed on the crucial elements of the skeleton.
We define nodes as branching nodes, skeleton as vascular net, segments as vessel sections between branching points, area(vessel) as area of vessel, count() as function of quantity determination, and length() as function of length determination, respectively.
Branchiness and curliness describe complexity of vessels net. They are defined by ratio of node number to length of skeleton and to count of skeleton segments correspondingly. The skeleton segment is fragment of skeleton between nodes or skeleton ends.
Definition of tails allows to produce characteristics for description of topological properties with complexity of vascular net. They are tailness, tails curliness, and tails ratio.
These characteristics and their combination with flow speed allow to describe hydrodynamics properties of vascular net. It can be used in monitoring and diagnostics.
Comparing the data obtained before and after treatment, the clinicians receive objective information about the newly formed vessels and other changes in the vascular net.

Discussion and conclusion
In this paper, we propose a method for determining the characteristics of blood flow in the vessels of eye conjunctiva, such as linear and volumetric blood speed, and topological characteristics of vascular net. The method first analyses image frame by frame sequentially and then builds integral optical flow for video sequence. Dynamic characteristics of eye vessels are introduced and calculated. These characteristics make it possible to determine changes in blood flow in eye vessels. We show the efficiency of our method in real eye vessels scenes.
The method was tested on the video sequence of blood vessels of conjunctiva. The change in blood flow speed in vessels reflects the change in blood flow in the microcirculatory bed, as well as in various organs in normal and pathological conditions. The study was conducted using a high-resolution monochrome digital video camera Imperx Bobcat IGV-B1410M with a microscope lens with a focal length of 40 mm.
The linear speed of blood flow in a vessel with a diameter of 1.91 µm is 0.50379 relative units, which corresponds to 5•10-5 m / s. This result is consistent with the data obtained by the Doppler method.
The proposed method is designed to study the characteristics of the blood-vascular net. It is based on the determination of the instantaneous linear and volumetric speed for each point of the vessel. The method allows to carry out a quantitative assessment of the cross-section area, and linear and volumetric speed in the vessels in normal and in various pathologies.
We define the following characteristics of vessels: branchiness, curliness, tailness, tails curliness, tails ratio, vessel length, and mean vessel width. These topological and dynamical characteristics allow to detect new possibilities for eye vessels analysis during healing process. That allows to quantify changes in the linear speed of blood flow in the vessels of healthy people in the simulation of hypercapnia and hyperoxia.
In comparison with the known methods based on static images analysis, our method allows to detect and study blood flow in eye vessels in dynamics. Such description allows to predict effectiveness of treatment.
The defined characteristics make it possible to determine changes in blood flow in the microcirculatory bed, which in turn determine changes in blood flow in the vessels of the brain, kidneys, and coronary vessels.