Method for calculating the heterogeneity of the linear dimensions of the EIT image

. The paper proposes a method for calculating the heterogeneity of the linear dimensions of the EIT image. The essence of the method is to identify the region of inhomogeneity Gn by the method of binarization and segmentation and determine its geometric dimensions. The ROI represents a matrix, each element of which is the color value of a particular pixel p. The reconstructed image is being processed. The binarization algorithm processes and determines each element of the matrix, bringing it to a binary form. Next, a w × h matrix is formed and the image is divided into sets p, where, according to the selection criterion Gn, the segmentation procedure is performed using the two-pass ABC-mask method. At the last stage, the geometric dimensions of the inhomogeneity are determined. The results of the analysis of the reconstructed image are presented, the image of the inhomogeneity Gn filtered as a result of binarization and segmentation operations, as well as its geometric parameters are obtained. The operation of the method on computer models for inhomogeneities has been verified. The proposed method allows you to get a clearer and more accurate visualization of the internal structures of the object under study, reduce measurement errors and incorrect solution of the inverse problem .


Introduction
Electrical impedance tomography (EIT) is one of the methods of medical imaging of the internal structures of the object under study, the principle of operation of which is based on assessing the change in the field in a given section of the object when a low-amplitude highfrequency current is injected through the object (according to a given algorithm) while simultaneously recording the emerging potential differences. [1][2][3][4][5].
The obtained measurement data are associated with difficulties in estimating the linear dimensions of the inhomogeneity, which are due to measurement errors and incorrect solution of the inverse problem.
In this regard, there is a need to develop new methods and algorithms to improve the reliability of the reconstruction of the EIT study. To do this, this paper proposes a new method for calculating the linear dimensions of the inhomogeneity for EIT. It is based on the selection of the region of inhomogeneity Gn by the method of binarization and segmentation, and the determination of its geometric dimensions.
The practical implementation of the method requires the creation of a method for calculating the heterogeneity of the linear dimensions of the EIT image. Given the above, the tasks that need to be solved in the course of this work are defined: -to develop a method for calculating the linear dimensions of inhomogeneities in the reconstructed EIT image by highlighting the area of inhomogeneity Gn by the method of binarization and segmentation and determining its geometric dimensions; -check the operation of the method on computer models for inhomogeneities.

Development of a method for calculating the linear dimensions of an inhomogeneity on a reconstructed EIT image
The implementation of the EIT method is based on the successive implementation of the following main stages: measurement, reconstruction, visualization and decision making. This scheme reflects the principle of EIT and is characterized by a number of disadvantages. They are associated with the occurrence of errors at each stage. In this regard, the proposed structure requires changes in terms of adding an additional block -processing the results. This approach makes it possible to reduce the influence of a number of inaccuracies on the visualization of the calculation results. Processing of the results can include a wide range of tasks for mathematical processing of both the reconstructed conduction field and the rendered dynamic image. One of the key blocks is the calculation of linear dimensions. A method is proposed for calculating the linear dimensions of an inhomogeneity in a reconstructed EIT image, which consists in selecting the area of inhomogeneity Gn by the method of binarization and segmentation and then calculating the dimensions of the filtered image dx and dy using the method of segmentation and formation of an array of pixels belonging to the area of inhomogeneity.
Let's consider the implementation of the method for calculating the size of the inhomogeneity on the reconstructed image. Let the study area RO (shown in Figure 1(a)) be divided into a finite number of elements, the totality of which forms the matrix I(w,h) ( Figure  1(b)). The next step after splitting the study area RO is the transition to a color matrix I of size (w × h), each element of which is the color value of a particular pixel p (shown in Figure  1 (c)).  For subsequent analysis, the input data is an image that describes the result of the reconstruction. In the future, work with this image is performed as with a color matrix.
(1) where w -vertical size of color matrix I; h -horizontal size of color matrix I; x -horizontal coordinates of the matrix I element; y -vertical coordinates of the matrix I element; p -individual image pixel. A schematic representation of I(x,y) is shown in figure 2 (a).  Before starting the analysis, the image (figure 2 (a) is presented in binary form. The binarization procedure [6] is used to convert the color matrix to binary form. The binarization algorithm processes I(x, y) and checks each of its elements (figure 2 b). of each element of the binary matrix p takes the values: where Δδ0, d0, l0 -initial conditions (impedance, inhomogeneity diameter, distance from the nearest Ei respectively); The threshold value is selected based on the developed decision rule, taking into account the possible presence of a priori information about the size of the inhomogeneity Gn and its position relative to the nearest Ei. In the process of binarization, a matrix M is formed with the size : .
For the process of dividing a digital image into several areas (sets p), for which a certain selection criterion Gn, is met, the segmentation procedure is performed [7].
Image segmentation in the module is implemented by the two-pass ABC-mask method [6], the minimum element in the segmentation algorithm is not a separate p, but a segment consisting of three elements A, B, C, where: , , where i, j -coordinates p that satisfy the condition .
A block diagram of the proposed segmentation algorithm is shown in figure 3 (a), a schematic representation of the described ABC segment is shown in figures 2 (c) and 3 (b).

only pixel B or C is labeled respectively -B mn, A mn and С mn, A mn;
-A = 1, C = B > 2, while B and C belong to the same group -B mn, C mn, A mn; -A = 1, C > 2, B > 2, C ≠ B, while B and C belong to the same group -A is also marked with a label mn, but besides B mn+1, C mn+1; -if B and C are marked with signs of different mn, mn+1, A is labeled with any of these labels, and the labels themselves are entered into the array of groups Gn. As a result, a labeled matrix is generated M', , and an array of equivalent labels mn, in which various mn Gn. From each mn is chosen minimal mn Gn. Next, the analysis of elements simultaneously marked with different labels is performed. B mn, mn+1, C mn+1, mn+1, the final match is established mn Gn.
At the stage of determining the geometric parameters (figure 2 (d)) Gn, a set of pixels is used p(i,j) Gn. The proposed algorithm for calculating the position of the inhomogeneity is as follows: -determination of the coordinates of the center of the region ; -calculation of the euclidean distance l between the center Gn and each of the electrodes , ; -choice of the smallest l.
The average linear size is the diameter of the circle d and inscribed in the inhomogeneity and is defined as the arithmetic mean of the vertical and horizontal values dy and dх respectively: . (10) Thus, as a result of performing the described stage of the analysis of the reconstructed image, the image of the inhomogeneity Gn, filtered as a result of binarization and segmentation operations was obtained in graphical and digital form in the form of a matrix M', and its geometric parameters were obtained in the form of and d.

Using the algorithm for calculating the heterogeneity of the linear dimensions of the EIT image on computer models
Let's check the operation of the algorithm on computer models for such inhomogeneities as: circle, square, oval, rectangle, triangle, star. The developed computer three-dimensional models are shown in figure 4 (a). Figure 4 (c-f) shows sets of full-size physical models of inhomogeneities made of polymer plastic using additive technologies.  Using the developed software that implements the method and algorithm for refining the boundaries, filtered images of reconstructions of the results of the studies were obtained. Comparison of sample results of reconstructions with the study model is presented in Table  1. Figure 5 shows the designation of the dimension of the boundaries of the filtered images of the reconstructions of the results of the studies (a, mm), as well as the designation of the dimension of the boundaries of the filtered images as a result of binarization (a1, mm).  Mathematical processing algorithms are applied to the obtained reconstructed images. The results of finding deri for each reconstruction are loaded into the Statistica 10 software [8], where they are processed.
The plot of eigenvalues shown in figure 6 for the purpose of applying Cattel's scree criterion [9] shows the presence of two or three factors that affect the results obtained.   The analysis of the main accumulations A1-A4 of points of load factors shows the occurrence of difficulties in identifying the size and shape of inhomogeneities located in the center of the object under study. Figure 9 shows a cumulative plot of the errors γ versus d. Similarly, the summed normalized determination error [10,11] Σγ1 is indicated for the values of d' obtained as a result of refinement of the boundaries of the inhomogeneity, Σγ2 is indicated for the values of d' obtained as a result of the refinement of the dimensions of the inhomogeneity. As a result of the application of the developed method for clarifying the boundaries of inhomogeneity, the error in determining γ was reduced by 1.44 times.

Conclusions
As a result of the work performed, a method for calculating the linear dimensions of a heterogeneity on a reconstructed EIT image was proposed and implemented as an algorithm, which consists in selecting the region of heterogeneity by the binarization method and then calculating the dimensions of the filtered image dx and dy using the method of segmentation and formation of an array of pixels belonging to the region of heterogeneity.
The operation of the algorithm was tested on computer models for such inhomogeneities as: circle, square, oval, rectangle, triangle, star. It is shown that the use of the method of refining the boundaries of inhomogeneity reduces the error in determining the size of the inhomogeneity in the reconstructed image by 1.44 times.