## 3 Weak Interlayer Identification Method  
### Optical Image Characteristics of Weak Interlayer  
In the borehole image, if the light is uniform, the different colors in the image mainly come from the differences in the composition and structure of the rock mass. The greater the difference in composition and structure of rock mass, the greater the difference in the corresponding image gray value and gradient value. The optical image can intuitively show the difference of rock color and filling connection. The darker the rock texture, the darker the corresponding image. If the rock mass structure is not filled, the corresponding image is also darker. The image matrix information can effectively reflect these differences. There is a difference between weak interlayer and non weak interlayer in filling composition, that is, the difference in texture characteristics of hole wall is greater. Therefore, the response function TF of texture characteristics of hole wall is constructed to describe the difference in composition of rock mass and the degree of filling cement. In addition, the complete rock mass structure has a certain thickness, which is shown as the continuity of gray value on the image, and the weak interlayer has a certain discontinuity. To this end, the hole wall integrity characteristic response function is constructed to describe the difference in the continuity of the gray value of the rock mass image. Before the hole wall texture feature response function TF and the hole wall integrity feature response function IF are calculated, the optical unfolded image to be analyzed needs to be gridded first, and the specific size of the grid should be adjusted according to the actual situation. If the optical expansion image in Figure 4a is analyzed, the image with pixel point M \(\times\) N is divided into p \(\times\) q basic units, and the pixel point corresponding to each basic unit is M/p \(\times\) N/q, as shown in Figure 4b. Figure 3: Schematic diagram of acoustic wave scanning data processing. (**a**) Scanning data, (**b**) circular matrix, (**c**) circumferential visualization. A two-dimensional function \(f_{h}(x,y)\) is defined to represent the borehole image at the borehole depth h. The upper left corner of the borehole image is a dot of the corresponding coordinate system, the upper edge of the image is the \(x\)-axis direction, that is, the image expansion direction, and the left side of the image is the depth direction, that is, the depth direction of the borehole. \(\
abla f_{h}\) represents the gradient value at the midpoint (\(m\), \(n\)) of the coordinate system, and its corresponding expression is:  
\[\
abla f_{h}=grad(f_{h})=\left[ \begin{array}{c}G_{h,x}(m,n)\\ G_{h,y}(m,n)\end{array} \right]=\left[ \begin{array}{c}\sum\limits_{k=-1}^{1} \left[f_{h}(m+k,n+1)-f_{h}(m+k,n-1)\right]\\ \sum\limits_{k=-1}^{1}\left[f_{h}(m+1,n+k)-f_{h}(m-1,n+k)\right]\end{array} \right] \tag{2}\]  
where \(G_{h,x}(m,n)\) is the gradient value of the pixel point (\(m\), \(n\)) on the borehole image at the borehole depth \(h\) in the \(x\) direction, and \(G_{h,y}(m,n)\) is the gradient value of the pixel point (\(m\), \(n\)) on the borehole image at the borehole depth \(h\) in the \(y\) direction, and the amplitude value is:  
\[|\
abla f_{h}(x,y)|=\sqrt{G_{h,x}(m,n)^{2}+G_{h,y}(m,n)^{2}} \tag{3}\]  
The borehole unfolding image represents the rock mass structure information of 360 degrees of the borehole. In order to further refine the distribution of weak intercalations of the rock mass in different directions, the image can be decomposed into multiple images along different directions. It is assumed that the pixel point of the borehole image at the borehole depth \(h\) is M \(\times\) N. Divided into q groups in the \(x\)-axis direction, i.e., q column scanning lines, then the number of pixel points on the borehole image corresponding to each column scanning line is M \(\times\) (N/q).