Keywords

1 Introduction

Retinopathy of prematurity (ROP) affects predominantly premature infants with a birth weight of less than 1500 g born before 32 weeks of gestation. The disease can lead to blindness. The most important pathological changes occur on the retina at the border between its non-vascular and vascular part. There are scarring changes and growth of pathologically altered vessels. At this interface, further retinal development stops [1]. Tortuosity, or curved arteries, and veins are commonly found in the human body and in animals. While mild tortuosity is a common anomaly without clinical symptoms, severe tortuosity leads to severe symptoms. Tortuosity is investigated in atherosclerosis, hypertension, genetic defects, diabetes mellitus, and in the elderly [2].

Retinal vessels are often affected by retinopathy tortuosity. It further affects arterioles and capillaries in skeletal muscle, myocardium, brain, and tumors. Coronary arteries are altered in patients with hypertension and myocardial infarction [2].

2 Related Works

Hough Transformation can be used for detection of the retinal blood vessel because the method is based on analytical shape detection such as lines, circles, or ellipses. This algorithm has its weaknesses, the success of the method depends on the quality of the input images [3].

In different access, it can be implemented a procedure for segmentation of the retinal vascular system using two-dimensional Gabor filters amplified by adaptive histogram equalization (CLAHE). This technique seems to be useful without unnecessarily increasing errors. Provides great precision and sensitivity. However, the properties of images can be improved by changing values in the algorithm, e.g. for vessel width, threshold value, or better eye image [4].

A method based on Gabor filters can be used for the automatic detection and segmentation of coronary arteries in X-ray angiograms In reference 5, they tested various parameters directly on angiograms to select those most suitable for the Gabor filter [5].

The Morlet wavelet transform solution is a method for detection images from the STARE and DRIVE databases. Detection by this method is not 100%, it contains errors in some images due to the presence of noise, optical disc, hemorrhage or other high-contrast pathologies [6].

Thanks to the Gabor filter, papillary lines can be highlighted [7].

3 Design of Proposed Segmentation Algorithm

The segmentation algorithm consists of Gabor’s transformation and linear regression, cross validation of both models using the “gold standard” and the maximum response to Gabor’s transformation. Database DRIVE uses the results of manual segmentation created by observers under the supervision of experienced ophthalmologists as a “golden standard” and in STARE database, there are resultant binary images after segmentation by Valentina Kouznets as “golden standard”. The proposed algorithm is shown in Fig. 1.

Fig. 1.
figure 1

Design of segmentation algorithm based on Gabor Transformation.

3.1 Gabor Transformation

This is a convolution of the input image with one of the components of the Gabor 2D function. In practice, images in computer graphics are represented as a discrete point grid, so they cannot be filtered by a continuous filter. It is necessary to create the so-called core filter K of dimensions IxJ which can be used to perform discrete convolution of the image by dilatation, translation, and rotation [8, 9].

In the next step, it is used extraction the symptoms from the image. This is the procedure where the input image is transformed by a bank N Gabor filters, resulting in 2 N responses at each point of the image. One response is for the imaginary part, the other for the real one. Subsequently, the magnitude of the total response of the imaginary part combinations is calculated, so the result has only a N response [8].

The image (Fig. 2) demonstrate the response to the core of the Gabor wavelet consisting of real and imaginary parts with given parameters. The Gabor filter can be defined:

$$ g \left( {x, y;\, \lambda , \theta , \sigma , \gamma } \right) = exp \left( {\frac{{ - x^{{{\prime }2}} + \gamma^{2} y^{{{\prime }2}} }}{{2\sigma^{2} }}} \right)exp\left( {i\left( {2\pi \frac{{x^{{\prime }} }}{\lambda }} \right) + \psi } \right) $$
(1)
Fig. 2.
figure 2

Testing and Gabor Image (up), the response to the Gabor wavelet with variable kernel parameters real and imaginary part (bottom) in MATLAB from the DRIVE database

Where λ represents the cosine factor bandwidth, orientation, ψ phase shift, σ is the Gaussian envelope sigma, and γ is the spatial aspect ratio.

3.2 Generalized Linear Model

Generalized Linear Model (GLM) includes various variants including linear regression. This model has long been used for data analysis. We can write it using the matrix expression:

$$ Y = X\beta\, +\, \varepsilon $$
(2)

Where Y is the vector n of the values of the explained variable, X is the matrix of the values of the explanatory variables, β is the vector p of the unknown parameters and ε is the vector n of the random component values [10].

In this work desirable to examine the relationship between two images and their pixels in a binary image. One of the variables is the so-called independent variable x, which affects the second, the so-called dependent variable y. These variables are assumed to be continuous. The first step in the analysis is plotting data into a point graph, the so-called correlation field, and verifying that there is a real dependence between the quantities, the so-called regression. The simplest form of dependence is a simple linear regression assuming a linear dependence between two variables. It can be expressed by:

$$ y = \beta_{0}\, +\, \beta_{1} . y_{1}\, +\, \varepsilon $$
(3)

Where β0 and β1 are parameters of the regression equation and ε is called residual deviation or error. The theoretical values of the parameters are denoted by the Greek letters (\( \beta_{0} \) and \( \beta_{1} \)), the predicted values are b0 and b1. The desired regression line will take the form: [11, 12]

$$ y = b_{0}\, +\, b_{1} . y_{1} $$
(4)

In the following figure (Fig. 3), the output of the GLM model from the “golden standard” is shown, which is then compared with the resultant image after the Gabor wave filtration.

Fig. 3.
figure 3

Testing image (left), “Gold Standard” (in the middle), Output of GLM model (right).

4 Testing of the Implemented Segmentation Algorithm

In this paper were used databases DRIVE and STARE for testing the proposed segmentation algorithm.

4.1 Used Databases

The DRIVE (Digital Retinal Images for Vessel Extraction) database was established as a standardized database to support the research of segmentation of the blood vessels in retinal images. 400 diabetic subjects were observed between 25 and 90 years of age. Forty of them were randomly selected, 33 subjects showed no evidence of retinopathy, 7 yes. All images are compressed into JPEG format. They were captured using Canon CR5 with a non-mydriatic 3CCD camera with a 45° field of view. All images are RGB with 8-bit color depth and a resolution of 768 to 584 pixels [13].

The STARE (Structured Analysis of the Retina) offers 400 images of the retina with a specified diagnosis. The database contains 20 images for retinal vascular segmentation, 10 of which have a pathological finding. The TopCon TRV-50 fundus camera was acquired with a 35° field of view. The color depth of the images is like the previous 8 bits with a resolution of 605 to 700 pixels. They are compressed into PPM format [14, 15].

4.2 Testing on the Real Data

The algorithm based on the Gabor transformation for segmentation of the retinal blood vessels was applied to 40 images, more precisely 20 image data comes from the DRIVE database and the last 20 images from the STARE database. Resultant images after the segmentation algorithm based on a linear regression and resultant images after previous mentioned segmentation, were comparing with “golden standard” of retinal vessels. If there is a match between the vessels in both models, this will be indicated in the predicted model (output). In the DRIVE database, such as “golden standards” are already available, so they are drawn directly from the source. In the STARE database, this is also the case with the fact that the segmentation by Valentina Kouznets has been chosen. During testing were changed parameters of setting Gabor wave.

The First Set of Parameters for Gabor Transformation

The algorithm with parameters (see Table 1) was applied to these image data (Fig. 4). Due to the fact that Gabor’s transformation is a computationally demanding process, MATLAB records the times of this procedure at given parameters. 20 images from the DRIVE database were tested, 10 of the test scores and 10 of the training session images. In addition, all the images from the STARE database for 20 images.

Table 1. Set parameters of Gabor filter n. 1
Fig. 4.
figure 4

Example of optimized output with set parameters n. 1 (from left): native image, GLM model and output image.

An overview of average and median computational times in the following table (Table 2). Obviously, this computational time is affected by the pixels of the image and therefore is longer at the fundus image than images with low resolution.

Table 2. Averages and medians of computational time from database DRIVE and STARE with setting parameters n. 1

The Second Set of Parameters for Gabor Transformation

Testing also took place when the original parameters were changed (Table 3). Overall, the aim was to increase the sensitivity of vessel detection by reducing the angle of rotation, by mitigating the steps in the wavelength setting and by slightly increasing the frequency. As a result of this setting, the computational difficulty increased (Table 4). The newly set parameters can be seen in the following table, then the newly measured times. This change in parameters has had a positive effect on the elimination of obstruction in the resulting image (Fig. 5).

Table 3. Set parameters of Gabor filter n. 1
Table 4. Averages and medians of computational time from database DRIVE and STARE with setting parameters n. 2
Fig. 5.
figure 5

Example of optimized output with set parameters n. 2 (from left): native image, GLM model and output image.

The Third Set of the Gabor Filter

At the last change of values, only 6 images from each database were tested due to the most time-consuming. All outputs including ROC (receiver operating characteristic) curves (see below) lasted about 25 to 35 min. The final times only Gabor transforms are recorded again in the tables (Table 5). ROC curve allows you to assess the ability of a diagnostic test depending on its sensitivity and specificity, thus eliminating the consequences of wrong decisions. These two components measure the validity of the test.

Table 5. Averages and medians of computational time from database DRIVE and STARE with setting parameters n. 3

During the last set of the Gabor filter, it was changed the frequency from 0.05 to 0.35 with step 0.05. The size of wavelet was the same as in the preview settings. The angle was smaller from π/12 to π – π/12 with step π/12. Below it is shown images after applied algorithm with setting parameters n. 3 (Fig. 6).

Fig. 6.
figure 6

Example of optimized output with set parameters n. 3 (from left): native image, GLM model and output image.

5 Evaluation of Testing

For the overview, all the times that have been mentioned so far are graphically recorded. First for the DRIVE database and then for the STARE database separately (see Figs. 7 and 8).

Fig. 7.
figure 7

The computational difficulty of calculation Gabor transformation images from database DRIVE with different parameters

Fig. 8.
figure 8

The computational difficulty of calculation Gabor transformation images from database STARE with different parameters

It has been found in the STARE database that only one “gold standard” is not suitable for detecting blood vessels in different patients. Images were divided into groups according to the location of the optical disc (left, right, and center). Then, for each group, a “gold standard” were randomly selected and according to him, the segmentation of the vascular bed was taking place. As already mentioned, it is not appropriate to use a universal “golden standard”. Failure was apparently due to individual vessel deployment on the retina, as well as the heterogeneity of the location of the optical disk or the leading vessels.

In addition, the extent to which results were influenced when applying image preprocessing techniques to images from the STARE database was tested. The results were expected to be largely unaffected, but the result is surprising. The original images had on average a 22.3% better ROC curve rating (more on the ROC curve in the next chapter) than images that were preprocessed, except for G channel extraction and monochromatic image conversion.

The results from the databases were evaluated based on ROC analysis. In the test of classification by Tapea, there are results, in this case, are in evaluation EXCELLENT. The average is 0.9605 and median is 0.96 (see Fig. 9).

Fig. 9.
figure 9

ROC curve with value AUC 0.97 from DRIVE database with parameters n. 1

These results, according to the above-mentioned classification, range from GOOD to EXCELLENT. The mean value is 0.9155 and the median 0.92. At the first change of parameters, the area under the curve slightly increased. Subsequently, results with images with parameters 2 will be demonstrated.

The average AUC (area under the curve) of the images from DRIVE database with parameter setting 2 is 0.967 and the median equals 0.97. There was an increase in AUC compared to those with parameters 1 and ±0.01, i.e., about 1%. For STARE, the average value is 0.938 and the median equals 0.94 (Fig. 10). There was an increase in AUC of ±0.02, by 2%. The third parameter setting was DRIVE The mean AUC is 0.9733 and the median 0.927a for the STARE database. The mean value equals 0.927 and the median is 0.92.

Fig. 10.
figure 10

ROC curve with value AUC 0.97 from STARE database with parameters n. 1

6 Conclusion

Fundus images have sufficient contrast to the retinal background and resolution. During the testing, the Gabor filter parameters were gradually changed for all image data. By reducing the angle of rotation of the Gabor filter and improving the other parameters, better results were obtained for background images. Because of all the data, the computational intensity has increased due to fewer revolutions and thus increased the number of records.

The ROC analysis also showed an increase in most cases. It has been experimentally investigated if “Golden Standard” can be used with images from the STARE database.

In addition, it has been tested to what extent the pre-processing of basic records from the STARE database will be affected, which have not been performed due to a larger number of pixels.

The result was not the expected slight increase in AUC, but the decrease by more than 20%. The reason is data bias due to this preprocessing algorithm. Since tortuosity has not been parameterized so far, the proposed algorithm, based on the calculation of the 1st derivative, is suitable as regards the display of a certain curvature based on the threshold value chosen by the physician.