Detection of lung pathology using the fractal method

ABSTRACT


INTRODUCTION
According to official data, the number of patients with pneumonia is registered annually in Kazakhstan, for example, in 2020 to 3,000, in 2021 to 4,000, and in 2022 to 5,000.At the moment, there is a high probability of damage to respiratory diseases.For the timely detection of the most severe of them, each person must undergo an annual fluorography.At this stage, there is a possibility of an error-an unnoticed pathology will remain with a person for a year, turning into a more serious form and having complications.Provided that the specialist has discovered the pathology, the patient needs to undergo an x-ray, which will only increase the likelihood of a diagnosis.Therefore, the detection of pathologies on radiographs today is an urgent problem.To reduce the error in annual fluorography, as well as speed up the Int J Elec & Comp Eng ISSN: 2088-8708  Detection of lung pathology using the fractal method (Gulzira Abdikerimova) 6779 process and reduce the stages of diagnosis, the use of an x-ray image segmentation algorithm for its subsequent analysis is considered.The purpose of the article is to study and evaluate the applicability of the fractal method for detecting lung pathology.It aims to determine the effectiveness and accuracy of this method in the early detection of pathologies such as lung cancer, pneumonia, or fibrosis, as well as to identify possible advantages and limitations of it is use.The article discusses various aspects of fractal analysis of lung tissues, including image segmentation methods, calculation of fractal dimension and other parameters, as well as the use of classification algorithms for the diagnosis and determination of the nature of pathologies.The main purpose of the work is to provide evidence of the effectiveness of the fractal method in detecting lung pathologies, supported by the results of experiments on real clinical data.Such information can contribute to the development of new methods of diagnosis and treatment, as well as increase the effectiveness of predicting results and applying an individualized approach to patients with lung diseases.
The solution to this problem in the article is proposed by one of the developing areas in digital image processing-fractal analysis.The development of this direction is facilitated by the fact that most images can be considered fractal or multifractal to some extent.Therefore, any image has the properties and characteristics of fractal objects, including invariance to the viewing scale and rotation, which should be used to develop new methods of fractal image processing.The fractal dimension is a measure of the complexity of a geometric shape.In healthy lungs, the geometric shapes of the bronchi and alveoli have higher fractal dimensions, indicating a higher complexity of the structure.In the case of lung pathology, the fractal dimension values may decrease, indicating a loss of structural complexity.Another approach used to diagnose lung pathology based on fractal analysis is fractal spectrum analysis, which is a plot of fractal dimension versus scale.The fractal spectrum can be used to detect changes in the structure of the lungs associated with various pathologies, such as bronchial asthma, chronic obstructive pulmonary disease (COPD), and others.
However, it is worth noting that fractal analysis is not the only method for diagnosing lung pathology and is usually used in combination with other methods, such as a doctor's imaging analysis, lung function tests, and tests for allergic reactions.Visual analysis of the fluorogram image cannot always make it possible to determine the exact diagnosis of the patient's condition, therefore, methods and algorithms are needed to intelligently support the analysis of fluorogram images and make the final diagnosis.Fractal image analysis involves the calculation of the fractal characteristics of the entire image or its fragments, or objects in the scanning field.The main characteristic of a fractal image is its dimension, which determines the complexity of the fractal.Improving the quality of image analysis is associated both with the expansion of the resolution of image digitizing methods; by extending the bit depth of the binary representation of intensity and contrast to the maximum possible limits, implemented in the MATLAB environment using the image processing Toolbox, and by identifying promising areas for digital processing of X-ray images of the lungs based on fractal analysis.For the study, the internal parts of the lungs were considered, except for the part near the clavicles, the outer lateral, and lower parts of the globe, therefore, the borders of the lung pattern and the area around it are subtracted.

LITERATURE REVIEW
Based on image processing methodologies, Archana and Kalirajan [1] presents a comprehensive study of medical image analysis and its application to various forms of medical imaging.It also discusses the challenges scientists face in successfully executing and provides an overview of the advantages and disadvantages of existing algorithms.This case study highlights key terms to watch out for or future issues to consider when developing image processing techniques.
Rashed and Popescu [2] provides an overview of machine learning used in medical image processing and focuses on two main types (supervised learning and unsupervised learning) to evaluate their importance in medical image processing and explains the most important machine learning algorithms, the most important advantages and disadvantages of machine learning are discussed.Application of machine learning methods in medical imaging.In addition, some common algorithms such as k-nearest neighbors (KNN), support vector machine (SVM), decision trees (DT), logistic regression (LR), and random forest (RF) for the medical dataset were applied to test the performance of the algorithms.Lung cancer is the leading cause of cancer death worldwide.Medical imaging is essential for the diagnosis and prognosis of lung cancer.Medical imaging techniques, such as radiomics, can extract information from these images that are not available without computational tools and can be useful in the detection and treatment of cancer.Moreno et al. [3] presents modern methods of image processing used in the study of lung cancer, with an emphasis on two main tasks: segmentation of nodes or tumors and extraction of useful features for classification and prediction of tumor evolution using Radiomics.
Kothari et al. [4] proposed a method for detecting nodules in the lungs, based on single signs.Used a stationary wavelet transform and a convergence index filter to extract texture features and used AdaBoost to generate a white knot similarity map.A single feature was defined to assess the degree of candidate isolation.Both the degree of isolation and similarity to white nodules were used as the final score for candidates for lung nodules.Luo et al. [5] proposes a neural network for the diagnosis of pneumothorax based on feature fusion, where information about the frontal and lateral x-ray is combined.Their algorithm addresses the vanishing gradient problem in the pneumothorax recognition model and introduces a residual block to solve this problem.Due to the large number of channels, this model also uses channel attention mechanisms to improve model performance.Comparative experiments show that the fusion of a neural network of frontal and lateral chest images can provide higher accuracy than a single-task model.Adaptive morphological neural networks have been developed in Liu et al. [6] to classify chest x-ray images such as pneumonia and coronavirus disease (COVID- 19).A new structure is proposed that can self-learn morphological expansion and erosion to determine the most appropriate adaptive layer depth.
This work is devoted to the development of methods for the analysis of textural images of breast cancer.The main problem addressed in the article is the increase in requirements for preprocessing results.As a result of the task, images of chest magnetic resonance imaging are considered for image processing using textural image analysis methods.The main goal of the research is the development and implementation of algorithms that allow the detection and isolation of tumors in the female breast in the image.Textural features, clustering, and orthogonal transformations are used to solve the problem.In the article, the methods of analyzing textural images of breast cancer, namely: Hadamard transformation, skew transformation, discrete cosine transformation, Daubechs transformation, and Legendre transformation, the results of their software implementation on the example of biomedical images of oncological pathologies.In the example of breast cancer, it is shown that the most informative method for image segmentation is the method based on the Hadamard transform and the method based on the Haar transform.The article provides recommendations for using the obtained results in practice, in particular, it is shown that there are clinically important indicators, and other informative parameters that contribute significantly to the assessment of the degree of pathology and the probability of the development of the disease: diameter and curvature.Therefore, the requirements for the reliability, accuracy, and speed of biomedical image processing have increased.It is difficult for radiologists to classify chest x-rays because of the noisiness.Existing models based on convolutional neural networks contain a huge number of parameters and therefore require multifunctional graphical processing units (GPUs) for deployment.

METHOD
The fractal approach can be used as a method for detecting pathologies in x-ray images.Fractals are geometric objects that have a self-similar structure at different scale levels.Fractal analyzes can be used to describe the structural features of images, which can help in the identification and analysis of pathologies.One possible approach to using fractal analysis to detect pathologies in x-ray images is image texture analysis.Fractal texture analysis can help determine the degree of difference between different areas of an image, which can be useful in detecting the presence of pathology.For example, changes in texture may indicate the presence of a tumor or an inflammatory process.Another possible approach is to evaluate the geometric properties of an image, such as the shape, size, and location of objects.Fractal analysis can help identify changes in these properties that may indicate the presence of pathology.For example, changes in the shape and size of the lung lobes can indicate various lung diseases.Fractal analysis can also be used to compare images and detect changes over time.For example, comparing images before and after treatment can help evaluate the effectiveness of treatment and identify possible complications [7].
The following method was used as the basis of the algorithm for detecting multifractal structures of raster images.Bitmaps have a limited size proportional to r and c, where r is the number of rows and c is the number of columns.Let's designate the minimum cell-image pixel-  , where i=1,  and j=1, .The value   characterizes the gradation of gray from 0 to 255, where 0 means black, and 255 means white [8]- [13].We used a modified method for calculating generalized fractal dimensions, which assumes the presence of two types of pixels.To do this, we transform the original data set   into a new one (1), where Г= [1, 2] is threshold brightness level; 1, 2 is specified limits of analysis 1, 2, Г[0, 255].Table 1 shows the characteristics (), (), and  corresponding to the image partitioning.
where () and () are the number of the row and column from which the k -th cell begins.(3) and determine the "occupancy" of the k -th cell (4).
To determine the spectrum of fractal dimensions Dq, -≤q≤, describing a multifractal, we introduce the sum Representing the sample initial moment of the q -th order.Then the spectrum of generalized fractal dimensions is calculated by (7), −1 (7) where the function () has the form (8). The generalized fractal dimensions of a homogeneous fractal do not depend on q, that is,   =Dconst.This follows, as indicated in [14]- [19] from the fact that for a regular (homogeneous) fractal.

𝜏(𝑞) = lim
From where we learn the equality of dimensions.If the function   depends on , then the object under consideration is multifractal [20]- [26].Denote by  , the discrete analog of function (7) without passing to the limit (8), i.e., depending on the cell size : The spectrum of multifractal dimensions is calculated by (11).

RESULTS AND DISCUSSION
During the experiment, 40 images were studied.Among them, types of a healthy lung cavity, lobar pneumonia, pulmonary tuberculosis, focal tuberculosis, lobar pneumonia, echinococcosis of the lung, and segmental pneumonia were considered.As shown in Figure 2, the structure of x-ray optical images was studied, such as in Figure 2(a) an image with pathology, and the result of image processing with pathology is shown in Figure 2(b) and a table of images of the norm and some pathologies noted during x-ray diagnostics was compiled.On the images, deviations in the lung structures are visually observed with noted pathologies; these structural deviations are highlighted in the analysis of the radiograph by software.In this work, the algorithm for performing the fractal method in detecting pathology in x-ray images was performed as follows: a) Obtaining an x-ray image from open-access databases.b) Image processing (improvement of contrast, segmentation of the studied area).c) Splitting the image into small blocks (windows) with a certain size.d) Calculation of the fractal dimension for each image window.e) Construction of the fractal spectrum for all image windows.The fractal spectrum is the dependence of the logarithm of the number of windows on the logarithm of the window size.f) Analysis of the obtained data to identify differences in fractal properties between normal and pathological areas of the image.g) Visualization of analysis results using color coding or other methods for a better understanding of the results.
(a) (b) Detection of lung pathology using the fractal method (Gulzira Abdikerimova)

6783
The distribution of fluorograms by classes was carried out by an experienced radiologist.The distribution was carried out according to two criteria-norm and pathology.20 experiments with the norm and 40 pathologies were conducted.The results of the fractal dimension for each image are shown in Table 2.For the obtained values of the deviations of the fractal dimension , distribution graphs were constructed illustrating the changes in the deviations of the fractal dimension in the order of the study.The values of the fractal dimension of norm and pathology differ well from each other.The deviation graphs of the fractal dimension  are shown in Figure 3.

Figure 3. Graph of deviations of fractal dimensions of norm and pathology
To detect pathology, it is important to process images before applying the fractal method.Studies have shown that this limit lies in the value of =2.75.Results below this limit are likely to be abnormal images.Studies have shown that this limit lies in the value of =2.75.Results below this limit are highly likely to be abnormal images.
To calculate a program that uses a complex mathematical idea to analyze an image, it is necessary to develop an appropriate image, assuming the results are obtained in advance.It is most logical, given that the program analysis occurs when an object is divided into pixels of a certain size, to create such areas, which is shown in Figure 4. Table 1 shows that the conclusion of the program for such conditions, "as no pathology was detected", coincides with the doctor's conclusion of about 96%, there are high coincidences with the conclusions "heaviness of the roots" -100%; 100% coincidence in pneumonia, which indicates a good sensitivity of the method.Only such diagnoses as the heaviness of the roots coincide with the expert's conclusions in less than 78%.Perhaps this is due to the insufficient number of cases.

CONCLUSION
The proposed algorithm for calculating the fractal dimension of raster images made it possible to create software for analyzing radiographs using fractal analysis methods.The development of an algorithm for a program for fractal processing of grayscale fluorographic images is an effective research application in image processing.The developed algorithm will further automate the process of sorting and diagnosing radiographs based on fractal analysis.In general, the fractal approach can be an effective tool for detecting pathologies in x-ray images.However, it must be taken into account that fractal analysis is a complex and computationally expensive process, and its use requires experience and specialized equipment.In addition, fractal analysis can only be used as an auxiliary tool, and the final decision on the presence or absence of pathology should be made by the doctor based on a comprehensive analysis of the data.

Figure 1
Figure1shows an example of such an image splitting for  = 4.In this example N(4)=9.In each "non-empty" cell, the number of unit pixels is calculated (2),

Figure 2 .
Figure 2. Processed images with (a) areas of interest, image with pathology and (b) the result of image processing with pathology

Figure 4 .
Figure 4.The result of the fractional method is the study of fluorograms with highlighted pathology boundaries

Table 2 .
The value of the fractal dimensions of images