Algorithm for detecting spherulite marker in human blood serum facies O E Malenova1, L I Trubnikova2, A S Yashina3 and M L Albutova2 1 Ulyanovsk State Technical University, Severny Venetz Street, 32, Ulyanovsk, Russia, 432027 2 Ulyanovsk State University, Lev Tolstoy Street, 42, Ulyanovsk, Russia, 432017 3 Research-and-Production Association Mars, Solnechnaya Street, 20, Ulyanovsk, Russia, 432022 e-mail: nika-lilu@yandex.ru Abstract. One of the effective methods of early medical diagnosis is the method of wedge dehydration. It is based on the analysis of facies images. Facia is a thin film of dried human biological fluids. The presence of special structures (markers) indicates various pathologies of the organism at their earliest stages. In this article, the algorithm for detecting spherulite marker on microscopic images of human serum facies is presented. The presence of spherulites on facies is the norm. However, the atypical form of spherulite is a marker of precancerous diseases: uterine fibroids, endometrial hyperplastic processes and the mammary gland. Due to the visual analysis of the marker, its characteristic features were identified. Then algorithmic detection methods for these features were developed. The decision on the probable presence of a marker was made if there was a combination of features of this marker. As a result of the application of the developed algorithm, most images of atypical spherulites were identified. 1. Introduction Currently, early medical diagnostic methods are actively developing. Of particular interest are methods based on the analysis of human biological fluids (BF). One such method is the wedge dehydration method. It consists of applying a drop of BF on a specially prepared and degreased slide. This drop is dried at room temperature in a closed cabinet and the film is formed and called the facies (from the Lat. Faciens - appearance, shape). The scheme of interaction of the elements of BF is recorded on the facies. After dehydration, information from the liquid phase is represented as various structures on the film. These structures are viewable under a microscope. D.K. Maxwell compiled the first theoretical description of the process of evaporation of a fixed large droplet flowing in the diffusion mode. In 1877 he considered the case of evaporation of a spherical drop in the article "Diffusion" [1]. L. Bohlen was the first to investigate dehydration in the field of medicine in 1942. He examined the capillary blood facies with a simple optical microscope and revealed a connection between the structures in these images and gastrointestinal tumors [2]. V.N. Shabalin and S.N. Shatokhin gave a justification for the possibility of using this method in medical research [3]. The development of algorithms for automated image analysis of the BF facies is of interest. This will allow the use of non-invasive diagnostic methods for mass screening of the V International Conference on "Information Technology and Nanotechnology" (ITNT-2019) Image Processing and Earth Remote Sensing O E Malenova, L I Trubnikova, A S Yashina and M L Albutova population with low costs and time. The detection algorithms for a number of markers are described in [5-11]. In the present work, the algorithm for the detection of spherulite markers is presented. The presence of spherulites on facies is considered normal. However, the atypical form of spherulite is a marker of serious diseases. Among them are such as uterine fibroids, hyperplastic endometrial processes and the mammary gland, which are among the precancerous. 2. Spherulite detection algorithm For the development of a detection algorithm the main features of the spherulite marker were highlighted. These features distinguish it from the basic structure of facies and other markers. 2.1. Marker description Spherulite is a complex rounded mineral aggregate. It consists of thin needle-like crystals and found in nature in the form of balls of radial-radiant structure [4]. The spherulite looks like a rounded crystalline formation on the facies in normal conditions. However, it can significantly change its shape in the presence of pathologies. Spherulites on facies of a healthy person are shown in figure 1. Spherulites on facies with pathology are shown in figure 2. It is noticeable that spherulites have a darker background, low variation, and a rounded shape in normal conditions. In pathology, the shape of a spherulite is different from an ellipse. Figure 1. Typical spherulites. Figure 2. Atypical spherulites. 2.2. Marker detection algorithm The algorithm was developed based on the features described above. It consists in the sequential application of the following operations to the original image. • Image segmentation by brightness. Spherulites are darker than the main color of the facies. The average brightness of the image is calculated and all areas are darker than they stand out. • Search the contours of areas with low brightness. • Search for closed contours. • Approximation by ellipse of the found closed contours. • Decision-making. V International Conference on "Information Technology and Nanotechnology" (ITNT-2019) 110 Image Processing and Earth Remote Sensing O E Malenova, L I Trubnikova, A S Yashina and M L Albutova 3. Description of the algorithm This paragraph displays the results of the analysis using this algorithm using the example of the image of the facies shown in figure 2 on the left. 3.1. Image preparation for processing The color image is loaded into memory when you start the program. The entire image is converted to grayscale because the marker colors do not carry important information (figure 3). A median filter is carried out to get rid of random noise [12]. This reduces the number of false loops in the following steps. 3.2. Image segmentation by brightness Sections of the image with brightnesses above the average are removed. The result of the threshold section is shown in figure 3a. 3.3. Search the contours Outlining is implemented by the Canny algorithm [13] with thresholds T1=100 и T2=180. Where T1 and T2 are the thresholds of the minimum and maximum of the algorithm. Remove short borders with a length of less than 50 pixels using a pixel-by-pixel loop traversal. This is necessary to exclude random short contours. The bypass is implemented using the “Beetle” algorithm [14]. The remaining contours form the set C. The result is shown in figure 3b. 3.4. Search for closed contours The set of closed contours Cz is selected among the set C of the remaining contours. The definition of closed loop is implemented using pixel bypass. The criterion of closure is the return of the bypass to the starting point. 3.5. Approximation by ellipse Approximating ellipse E is found for each contour from Cz. It approximates the set of its boundary points O = {P(i) = ( x(i), y (i)), i = 1,..., N } . Consider a second-order curve equation x 2 + Bxy + Cy 2 + Dx + Ey + F = 0, (1) and choose the coefficients of this equation so that the sum of squared residuals of points of the set O N is minimal: ∑ [ x (i) + Bx(i) y(i) + Cy (i) + Dx.(i) + Ey(i) + F ] = min . An example of approximation of i =1 2 2 2 the system of points O by an ellipse is shown in figure 3c. a) b) c) Figure 3. Processing steps: threshold section (a), selection of contours (b), approximation with an ellipse (c). 3.6. Decision-making The atypical spherulite marker has large deviations of the boundaries from the approximating ellipse. In addition, the major and minor axes of the ellipse should be almost equal to the norm. V International Conference on "Information Technology and Nanotechnology" (ITNT-2019) 111 Image Processing and Earth Remote Sensing O E Malenova, L I Trubnikova, A S Yashina and M L Albutova Therefore, the evaluation form takes place in two stages. • The axes of the approximating ellipse are compared. The value r=a/b is considered, where a and b are the major and minor semiaxes of the ellipse. When r ∈ [1; 1,3) spherulite is considered normal, with r ∈ [1,3; 3) - with pathology, and for r ∈ [3; ∞) - the contour is removed from consideration. • The maximum and minimum distance of the boundary points from the center of the ellipse is estimated. Spherulite is considered pathological. If one of the thresholds is exceeded, a message on the presence of a marker is displayed. The threshold is calculated adaptively based on the size of the approximating ellipse. The minimum distance is defined as 0.8 from the minor axis and the maximum as 1.2 from the main axis. 4. Results of experiments The algorithm was tested on 200 images of facies of blood serum with x400 optical magnification. As a result of the test, 86% of the atypical spherulites images were correctly identified. The algorithm made false detections and chose several structures similar to the desired marker in 11% of the images. This suggests that in the future it is advisable to expand the set of features of this marker for more accurate identification. It should be noted that there were other markers among the images from the list of false alarms. Search for other markers is also included in the tasks of the developed marker detection software complex. 5. Conclusions In the course of this work, an algorithm and software for the automated detection of facies with suspicion of finding an atypical spherulite marker was created. Algorithm tests on real facies images showed acceptable results. 6. References [1] Kraevoy S A and Koltovoy N A 2016 Diagnosis using a single drop of blood, biofluid crystallization (Moscow - Smolensk) [2] Bolen H L 1942 The Blood Pattern as a Clue to the Diagnosis of Malignant Disease J Lab Clin Med 27 1522-1536 [3] Shatokhinа S N and Shabalin V N 2001 Morphology of human biological fluids (Moscow: Chrysostom) p 304 [4] Godovikov A A, Ripinen O I and Stepanov V I 1989 Spherulites, Spherocrystals, Spheroidites, Nucleospherolites Tr. Mineral. Museum of the USSR Academy of Sciences 36 [5] Krasheninnikov V R and Kopylova A S 2011 Identification of Pectinate Structures in Images of Blood Serum Facia Pattern Recognition and Image Analysis 21(3) 508-510 [6] Krasheninnikov V R and Kopylova A S 2012 Algorithms for automated processing images blood serum facies Pattern Recognition and Image Analysis 22(4) 583-592 [7] Krasheninnikov V R, Trubnikova L I, Albutova M L, Kopylova A S and Tarasova A V 2013 Algorithm for detecting tongue structures on images of blood serum Ulyanovsk medico- biological journal 4 70-73 [8] Krasheninnikov V R, Trubnikova L I, Albutova M L, Kopylova A S and Tarasova A V 2013 Detection of sickle-shaped cracks in images of facies of cervical mucus of a woman Ulyanovsk medico-biological journal 4 81-85 [9] Krasheninnikov V R, Trubnikova L I, Albutova M L and Yashina A S 2015 Algorithm for detecting a marker of gallbladder disease on images of blood serum Ulyanovsk Medical and Biological Journal 4 104-110 [10] Krasheninnikov V R, Yashina A S and Malenova O E 2017 Markers detection on facies of human biological fluids Procedia Engineering 201 312-321 [11] Krasheninnikov V R, Yashina A S and Malenova O E 2017 Algorithms for detection of markers onthe facies of human biological fluids Proceedings of the III International Conference ITNT- 2017 (Samara: New technology) 655-662 V International Conference on "Information Technology and Nanotechnology" (ITNT-2019) 112 Image Processing and Earth Remote Sensing O E Malenova, L I Trubnikova, A S Yashina and M L Albutova [12] Chervyakov N I, Lyakhov P A and Orazaev A R 2018 Two methods of adaptive median filtering of pulse noise in images Computer Optics 42(4) 667-678 DOI: 10.18287/2412-6179-2018-42-4- 667-678 [13] Canny J A 1986 Computational Approach to Edge Detection IEEE Transactions on Pattern Analysis and Machine Intelligence 6 679-698 [14] Potapov N N and Tupikov P A 2007 Methods for selecting contours in images 8th international conference Image recognition and image analysis: new information technologies 105-108 [15] Khorin P A, Ilyasova N Yu and Paringer R A 2018 The selection of informative features based on the coefficients of Zernike polynomials in various pathologies of the cornea of the human eye Computer Optics 42(1) 159-166 DOI: 10.18287/2412-6179-2018-42-1-159-166 V International Conference on "Information Technology and Nanotechnology" (ITNT-2019) 113