# The Application of Computed Tomography to Study the Soil Porosity of Mountain Red Earth
## 2 Materials and Methods
### Computational Method  
After selecting the cropped region of interest (15 cm \(\times\) 15 cm), the images were binarized and imported into ImageJ for analysis. Each slice's pore parameters, including quantity, area, and perimeter, were statistically analyzed. These parameters can be directly obtained using ImageJ.  
While the number, area, and perimeter of pores reflect their 2D morphological status, the shape and roundness of the pores can also be quantitatively evaluated using the pore roundness (C) metric. The calculation formula for the roundness is as follows [39]:  
\[\text{C}=4\pi\text{A}/\text{P}^{2},\]  
where A is the pore area; P is the pore perimeter; C is the roundness rate of the pore, which is between 0 and 1. The larger the value of C, the more circular the pore shape, with C = 1 indicating a perfectly circular pore. As C approaches 0, the pore shape becomes increasingly irregular. This roundness metric offers insight into the geometric characteristics of the pores within the soil structure.  
Apart from the aforementioned parameters, the intricate structures and characteristics of pores can be elucidated through fractal theory. At the heart of fractal theory lies the concept of \"fractal,\" which pertains to geometric shapes displaying self-similarity. By examining portions of these entities, one can observe structures mirroring the entire object. Fractal theory posits that many natural objects possess fractal surfaces in space, offering a theoretical basis for employing fractal models in image analysis. Fractal theory has found  
Figure 5: Binarized images at different depths (black area represents pores).  
extensive application in the quantitative analysis of soil pores as well as in studying the morphology and fracture of construction materials [40]. The box-counting dimension, in particular, has been applied in various fields, such as in the analysis of Ecological distribution patterns [41] and in the quantitative study of large soil pores [42], and has yielded positive results. The heterogeneity, complexity, and irregularity of pores can be characterized using the fractal dimension from fractal theory. In this study, the fractal dimension is determined based on the distribution of the original area of large pores [43]. The determination of this value can be achieved using the box-counting method with the calculation principle outlined as follows [44]: Let (A) be any non-empty subset of Rn. For any (r > 0), let (Nr(A)) denote the minimum number of cubes (or boxes) with side length (r) required to cover (A). If there exists a number (D) such that as (r\(\rightarrow\)0) we calculate the following:  
\[\text{Nr(A)}\propto 1/\text{rd}.\]  
Therefore, (D) is the fractal box dimension of (A). The specific approach involves processing each CT slice image into a binary image, followed by the application of square grids of varying sizes (with side lengths r) to cover the image. The number of pixels corresponding to large pores within the grid is counted as Nr. By selecting different sizes r, a range of Nr can be obtained. Next, using the least squares method, the natural logarithm of \(\text{lnr}\) and \(\text{lnr}\) is fitted to a straight line. The negative of the slope K of this line gives the fractal dimension D of the large pores, expressed mathematically as: D = \(-\)K. This method effectively quantifies the complexity of the pore structure by analyzing its fractal characteristics.