Study on 3D Pore Label of Porous Materials Based on CT Images

Microscopic pore structure is one of the important factors affecting macro porous materials physical properties, pore structure research for characterization of physical properties of porous materials is of great significance. In order to study the three-dimensional parameters of porous materials in each pore structure, such as pore size, volume, specific surface area, fractal and connectivity, it is necessary to label each pore structure in the three-dimensional structure. Two-dimensional CT image sequences in porous material as the research object, three-dimensional target marking algorithm is proposed. The sequence images using median filter algorithm to remove noise, through the automatic threshold segmentation algorithm, get the binary image. The boundary information of each pore is computed by Using the algorithm of two-dimensional multi-target label in each layer image. The 3D pore structure is labelled by the calculation of the projection relationship between the targets in the tomography image. The labelled result of pore structure is verified by single and whole reconstruction with marching cube algorithm. Results show that the porous three-dimensional pore structure was marked accurately, which lays a foundation for the calculation of 3D pore structure parameters.


Introduction
Porous material is a new type of engineering material, which has good macro physical properties such as diffusion, thermal conductivity and permeability. It is widely used in many fields and disciplines, and has important scientific research and engineering application significance [1].
The characterization parameters of porous materials' micro pore structure mainly include pore size, volume, surface area, fractal and connectivity, which are important factors affecting the macro physical properties and application effect of porous materials [2]. At present, the methods to measure these parameters are mainly based on the indirect method of experiment and the direct method based on image. The common mass volume method, floating method, vacuum impregnation method and immersion medium method are based on experiments [3]. With the help of the structural characteristics of porous materials, the parameters are measured by experiments. However, these methods can only represent a small number of parameters such as porosity of materials, and they are greatly affected by the shape of material samples, and the measurement error is relatively large. At the same time, the operation is relatively large Trouble. All methods based on experiments have their own limitations and low applicability.
In view of the limitations of experimental methods, direct method based on image has gradually become a research hotspot. SEM image of porous filter membrane was obtained by scanning electron microscope, and analyzed by image processing algorithm to obtain micro parameters [4]. The microstructure parameters of porous material were measured by image-based backtracking hole  [5]. However, these research methods are more based on the two-dimensional image information to indirectly obtain the three-dimensional porous material feature information, which can't fully reflect the three-dimensional structure information, and it is difficult to obtain the parameters of each independent pore of the three-dimensional structure.
In order to measure the parameters of each independent pore structure in the three-dimensional space of porous materials, it is necessary to label and identify the pore structure in the threedimensional space. In this paper, porous material CT sequence images are used to obtain binary images through image preprocessing, and the porous target of binary images are labelled. On the basis of binary sequence images labelling, 3D pore structure is labelled. The label results are verified by marching cubes algorithm (MC algorithm) and OpenGL technology to reconstruct independent pore and overall 3D structure.

Image filtering
Mean filtering is a common filtering method, which mainly uses the gray level of the image and statistical local information to eliminate the noise of the image. Mean filtering mainly deals with salt and pepper noise of image [6]. It is defined as follows:

Automatic threshold segmentation
Image segmentation is an important part of image processing. The main purpose is to segment the target information from the irrelevant information through processing algorithm in the complex image information, which is the process of extracting the region of interest. Image segmentation is the basis of image processing and analysis [7].
The method of image segmentation based on threshold has the characteristics of simple algorithm and high efficiency. The method mainly uses the gray level of image pixels. The threshold segmentation method is actually the following transformation from the input image f to the output image g [8]: Where: T is the threshold value, target element g (i, j) = 1, background element g (i, j) = 0. The core content of threshold segmentation method is how to calculate the segmentation threshold accurately and quickly. In this paper, the method of automatic threshold iteration is used to calculate the threshold value. The algorithm flow is as follows: (1). Calculate the gray histogram of the image, and get the maximum value MAX and minimum value MIN of the image pixel gray.  (2). Get the initial threshold value InitThreshHold = (MAX + MIN) / 2, and set the optimal threshold value OptThreshHold=0.
(3). Assign InitThreshHold value to OptThreshHold. (4). According to the value of InitThreshHold, the image gray level is divided into two areas. The high gray level area is higher than the value of InitThreshHold, and the low gray level area is lower than the value of InitThreshHold. In the two gray level areas, the average value of LowValue and HighValue are calculated respectively (5). Calculate the new InitThreshHold value, InitThreshHold= (LowValue+HighValue) /2, and compare InitThreshHold and OptThreshHold. If the two values are equal, find the best threshold and turn to (6). otherwise, turn to (3) to continue the algorithm.
(6). Returns the best threshold value, OptThreshHold, and ends of the iteration

Two-dimensional image label
Image label is used in many fields of image processing and pattern recognition. At present, the research of multi-target marking algorithm in image mainly focuses on the two-dimensional image labelling algorithm. In order to improve the accuracy of the label and reduce the interference factors, the image is usually preprocessed to obtain the binary image. From the image composed of only binary pixels 0 and 1, the adjacent set of 1-value pixels is extracted. The purpose of image label is to traverse the image, and use unique label to represent all pixels belonging to the same target object [9][10].
The research object of this paper is the three-dimensional pore structure of porous materials. Each independent pore structure needs to be distinguished by different numbers. In order to illustrate the labelling algorithm used in this paper, a group of matrix data is designed to represent the local image data, and the matrix data is shown in Figure 1, where "1" represents the pore structure and "0" represents the background. The main implementation steps of the two-dimensional image labelling algorithm in this paper are as follows: (1) Calculate the number of non-zero pixel clusters (called R) in each column, and sum the R number of the whole picture as numRs. Where, R is defined as the set of non-zero pixels that are close together. As shown in the matrix in Figure.1, the number of R in the first column is 2, the number of R in the second column is 1, and the number of R in the third column is 3. Scan the image column by column. If a non-zero pixel is encountered at the beginning of a column, it will be a new R. if the current pixel is a non-zero pixel, and the pixel above it is a zero pixel, it will be a new R. Every time encounters R, numRs plus 1, after scanning the image, the total R of the whole image will be obtained.
(2) Three data sets SR, ER, CI are calculated and obtained, whose length is numRs. Scan the image column by column. At the beginning of each column, look for the first occurrence 1 from the top of the column, and look for the first occurrence 0 from the position of this 1. In this way, determine the corresponding start line number, end line number and column number of each R. The parameters of SR, ER and CI were obtained by scanning the whole image.
(3) Calculate the number set Labels for all R's. Traverse all R's. If the ith R exists on the left adjacent column of its column, judge whether the R on the left adjacent column and the ith R overlap on the row. If they overlap, they are labelled with the same number. if not, they are labelled with different number. After traversing all R's, each R is labelled with a number, and finally the number set Labels is obtained.
(4) Sparse matrix and Dulmage-Mendelsohn decomposition algorithm are used to eliminate the wrong number in the number set Labels. Wrong number means that points belonging to the same R are labelled with different number. Through the above four steps, four information of each R in the image are obtained, which are the starting line number, ending line number, column number and number of R. For the whole image, each connected region as the target processing has a unique number, which can label multiple targets in the image. According to the pore structure of porous materials studied in this paper, through the above processing, all the pore in a image can be labelled.

3D pore structure label
The label and extraction of 3D porous material pore structure is the basis of the calculation and measurement of 3D porous material pore structure parameters. The specific method is to label the pore structure in different tomography images belonging to the same pore structure in three-dimensional space as the same number by judging the projection position relationship between the pore structures in adjacent tomography images. The algorithm steps of 3D pore structure labelling are as follows: (1) Calculation of pore structure boundary information in tomography image. The boundary information of pore structure plays an important role in the calculation of pore structure parameters, and can be used to judge whether the pore structure of tomography image belongs to the same pore structure in the vertical direction (in three-dimensional space). In this paper, 8-neighborhood traversal algorithm is used to judge the boundary of pore structure and obtain the boundary information.
(2) Based on the boundary information of pore structure, the pore structure of adjacent tomography images is judged whether it belongs to the same pore structure in three-dimensional space.
In this paper, the calculation method of projection overlap of pore structure is used to judge the identity of pore structure. The pore numbered K in the M-layer image is projected into the M+1-layer and M-1-layer images. If the boundary of K is overlapped with the pore numbered H of M-1, they belong to the same pore number. Similarly, if the boundary of K is overlapped with the pore numbered J of M+1, they belong to the same pore number. H, J and K belong to the same number in three dimensions and are numbered the same number. If it does not overlap, it is considered that it does not belong to the same pore structure in three dimensions and numbered differently.

Experiment
In order to better verify the Labelling effect of 3D pore structure, this paper uses marching cube algorithm and OpenGL graphical user interface to display 3D pore structure. The marching cube algorithm is a classical algorithm in the surface display algorithm. It is also known as the contour extraction algorithm. The realization process of the marching cube algorithm is the process of contour search. Lorensen sums up the iso-surface of the cube according to the reverse symmetry and rotation symmetry of the cube, sums up 256 kinds of iso-surface into 15 kinds of cube structures, and establishes a look-up table with a length of 256. During the calculation of the cube's iso-surface, the iso-surface can be determined according to the look-up table and the relationship between the vertex and the threshold value [11][12][13]. The research object of this paper is the three-dimensional pore structure label of porous materials, but the structure of porous materials is complex, especially the internal structure pores are connected and staggered, so the distribution of internal pores can't be accurately known. In order to verify the accuracy of this algorithm, test sequence images are constructed for verification. The test sequence image is constructed by computer, and the number of pores is 1, but there are different pores in different tomography, as shown in Figure 2 Using the algorithm in this paper, the 3D pore label result of the test sequence image is 1, and the reconstruction result is shown in Figure 2 (d). The results show that the algorithm in this paper can recognize and label the 3D pore structure well.
The algorithm is applied to porous materials, and the tomography image is shown in Figure 3.  Figure 4.
The internal structure of porous material pore structure is invisible in the three-dimensional space. In order to better display the label and reconstruction effect in this paper, the three-dimensional reconstruction is carried out with the hole as the target object, and the single pore, multiple pores and the whole are reconstructed separately, and the different numbered pore structures are distinguished with different color in the whole reconstruction. In Figure 5 (c), different connected pores are labelled by different color. It can be seen that different connected pore structures in the three-dimensional space are effectively labelled, which lays a foundation for the subsequent calculation of pore structure parameters.
(a) Independent pore label (b) Multiple pores label (c) Whole pores label Figure 5. Three dimensional labelling results of porous materials

Conclusion
In this paper, the algorithm of 3D space multi-target labelling based on the image of tomography sequence is used to record the 3D pores of porous materials, and marching cube algorithm is used to verify the results of 3D reconstruction of the marked pore structure. The experimental results show that the proposed algorithm can effectively label the pore structure of 3D porous materials and provide the possibility to calculate each independent 3D pore structure parameter. The algorithm in this paper can effectively obtain the three-dimensional multi-objective structure label, but the quantitative analysis of the accuracy of the three-dimensional pore structure label in this paper is still insufficient. It is an important direction of the follow-up research to propose a method that can quantitatively judge the accuracy of the label structure.