## 2 Materials and Methods
### Image Processing Method
#### 2.2.2 Edge Detection Method (ED)  
Edge detection method is an efficient operation for object recognition and boundary extraction in image processing. Canny edge detection deduces best approximation of the optimal edge detection operation through the algorithm of the first derivative of the Gaussian function, and it shows better edge detection performance than the other operators such as [PERSON], [PERSON], and [PERSON] [53; 54]. The [PERSON] and Prewitt operators have a relatively accurate positioning. But they are sensitive to noise because they do not include smoothing. Moreover, those two methods always show the detail loss of the image and lower accuracy of the edge. The Sobel operator has poor processing performance for images with mixed multiple complex noises. The Laplacian operator always processes edge lines too smoothly and lacks the authenticity of edge detection. However, the detection performance of Canny operator is better than that of gradient operator, and it can detect finer edge parts of an image [53]. Figure 7a shows a comparative result of those different image processing methods on a fractured rock CT image. Figure 7b represents a comparative result of the expanded CT fracture boundary. It can be clearly seen that Canny operator has an advantage in capturing the aperture edges. Moreover, this study focuses on grasping the fracture aperture variation under different confining stresses, and the Canny edge detection method is a new attempt in grasping the fracture aperture boundary, and it is important to know the microscopic changes in the aperture boundary and the contact area variation in fractured rock. Then, the accurate data in a rock fracture structure can reduce underground engineering disasters. Figure 6: Histogram comparison between original CT image and RG segmentation. (Black dot chart line is the original CT value of void phase, black dashed line is the normal distribution of void phase, red dot chart line is the original CT value of rock phase, and red dashed line is the normal distribution of rock phase.) Using the Canny edge detection method, a smooth image is successfully achieved through deducing the 2-dimensional Gaussian function:  
\[G(x,y)=e^{\frac{[\frac{x^{2}+y^{2}}{2\pi\omega^{2}}]}{2\omega^{2}}}, \tag{1}\]  
In Equation (1), \(\sigma\) represents the scale of smoothing. However, superfluous noise suppression may produce an image lacking fidelity. A comparative figure is shown in Figure 8. In this study, the value of \(\sigma\) is set as \(\sigma\) = 0. It can keep the aperture boundary accuracy, i.e., as the same shape with the original CT image. If an unsuitable \(\sigma\) is chosen equal to 4, the aperture boundary will become more smooth. It is not the same shape with the original CT image. In a CT image, an edge gradient is the vector which depends on the magnitude and the direction. The edge strength (magnitude) is calculated through the first-order derivative expression in \(x\)- and \(y\)-direction; then, the second-order derivatives is written in Equation (2):  
Figure 8: \(\sigma\) value difference in grasping the rock aperture boundary. (Red frames are the comparative parts of original CT image, edge detection result when \(\sigma\) = 0, and edge detection result when \(\sigma\)= 4). Figure 7: Comparative result of different image processing methods for grasping the aperture boundary of an original CT image (0 MPa Slice A). (**a**) Different image processing methods for grasping the rock fracture in a CT image. (**b**) Expanded CT fracture boundaries under those methods. \[L=\sqrt{\left(\frac{\partial f}{\partial x}\right)^{2}+\left(\frac{\partial f}{ \partial y}\right)^{2}}, \tag{2}\]  
where \(L\) is the first-order image derivative (the gradient magnitude) and \(f\) is the CT value at coordinates (\(x\), \(y\)) in a CT image. \(\partial f\)/\(\partial x\) and \(\partial f\)/\(\partial y\) are the vectors in the maximum rate change of \(f\) in \(x\)- and \(y\)-direction.