## 4 Methods
### Mosaic of borehole Video
#### 4.3.2 Proposed PTSAD Algorithm
The front view panoramic borehole-wall image, which is a mapping of the three-dimensional borehole-wall image within the effective lighting area to the two-dimensional image, was obtained from the borehole video. Figure 13a,b shows the front view images of four successive frames obtained from two borehole videos, respectively. The boreholes presented in this paper belonged to the field of exploration in a coal mine, which were drilled in the roof strata of a ventilation roadway. The stratum of a deep shaft coal roadway is mainly composed of sandstone, siltstone, mudstone and coal seam. The depth of boreholes was about 5.7 to 5.8 m.

### Center Positioning and Image Unwrapping Experiments

We first evaluated the proposed center positioning algorithm on different types of front view borehole-wall images. The images were obtained from forward-looking borehole videos taken by AVBCS. Figure 14a-c shows the process of center positioning for border images, fracture images and intact rock mass images respectively. From Figure 14, the region containing the drilled hole center was successfully segmented and then the center was extracted by our method accurately. The center of the preset blue box was the geometric center of image and its size was \(100\times 80\) pixels. Table 2 shows the coordinates of the drilled hole center for Figure 14. The parameter \(d_{c}\) is the distance between the geometric center of the image and the drilled hole center. The center coordinate of the drilled hole was different in each frame and the offset varied in a certain range. In addition, 500 continuous borehole-wall images were used to evaluate our algorithm in locating the drilled hole center and the results show that the proposed method was feasible and effective for the central location of various structural borehole-wall images. Figure 12: Schematic drawing of an axial view camera. Figure 13: Front view borehole-wall images. (**a**) Sample sequence of video 1; (**b**) sample sequence of video 2. For the front view borehole-wall image, we set the radii of the inner circle and outer circle to 50 and 110, respectively. The size of the rectangular image generated from the annular region was the 660 pixels \(\times\) 60 pixels (\(M\times N\), \(M\) = 2\(\pi R\) = 660, \(N\) = \(R\)-\(r\) = 60). Figure 15b,c shows the borehole-wall unfolded images generated by the bilinear and cubic convolution interpolations, respectively. The image effect of bilinear interpolation was very similar to that of the cubic convolution interpolation. Thus, it would not affect the overall image mosaic effect. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Image** & **X-Coordinate** & **Y-Coordinate** & \(\mathbf{d_{\varepsilon}}\) \\ \hline Figure 14a & 142 & 111 & 3 \\ Figure 14b & 143 & 109 & 3 \\ Figure 14c & 148 & 109 & 3 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Drilled hole center coordinates. Figure 14: The center location for three types of borehole-wall images. (**a**) Process of center positioning for border image; (**b**) process of center positioning for fracture image and (**c**) process of center positioning for intact rock mass image. Figure 15: Borehole unfolded images. (**a**) Front view borehole-wall image; (**b**) unfolded image obtained by the bilinear interpolation and (**c**) unfolded image obtained by the cubic convolution interpolation. ### Borehole Wall Unfolded Images Matching Experiment

Image matching is the key step to stitch a complete cylindrical panorama from a borehole video. In this paper, we proposed a PTSAD algorithm to realize the matching of the video image sequences. The matching effect had influenced the accuracy and efficiency of generating the cylindrical image directly. In this section, two adjacent unfolded images, as shown in Figure 16a,c, were used to confirm the validity of the proposed PTSAD algorithm for an automatic image mosaic.