## 4 Methods
### Mosaic of borehole Video
#### 4.3.2 Proposed PTSAD Algorithm
After eliminating the invalid frames, the two videos had 200 frames and 540 frames, respectively. Subsequently, these two video sequences were used to generate two complete borehole-wall cylindrical panoramas by our method. The execution time and the false matching rate for these two video sequences by different matching methods are provided in Tables 3 and 4, respectively. They show that the proposed method offered lower computational cost as compared to most other algorithms. The proposed method was nearly five times faster than the full-search NCC and three times faster than the full-search SAD. There are many different types of borehole-wall images in these two videos sequences such as border images, fracture images and intact rock mass images. Most significantly, experiments show that the proposed matching method could fulfill the matching tasks accurately for each different texture of the borehole-wall image. The mosaic results of these two video sequences are shown in Figures 23 and 24, respectively. Figure 14:1 The matching result of two consecutive frames. (**a**) Source image; (**b**) template; (**c**) matching result of normalized cross correlation (NCC); (**d**) matching result of SAD and (**e**) matching result of the proposed PTSAD method. Comparing the mosaic results and considering the matching results and execution time, we derived several advantages of the proposed PTSAD algorithm:

1. On the matching performance, considering the characteristics of the borehole-wall image sequences, the PTSAD algorithm ensures the accuracy and reliability of image matching by introducing the GPT process to the SAD. It has solved the problem of the change between the template and examined image. 2. On the computing time, the PTSAD algorithm takes the optimal search area and selects the simpler SAD algorithm. Thus, its computational speed is much faster than the SIFT and full-search NCC and SAD algorithms. From the intercepted front view images from borehole videos, as shown in Figures 23 and 24 on the left, we could only qualitatively observe the features of coal rock structure and the interface between rock and orebody, but have an obvious weakness in studying the developing degree of the fractural structure plane or the distribution and thickness of the ore vein [38; 39]. However, all these problems could be solved by using the borehole-wall cylindrical panoramas as shown in Figures 23 and 24 on the right, where both the integral and detailed information of a borehole such as the fracture distribution, rock mechanical properties and seam thickness can be obtained [40; 41]. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Exec. Time (s)** & **False Matching Rate (\%)** \\ \hline SIFT & 802 & 23 \\ Full-search NCC & 698 & 39 \\ Full-search SAD & 413 & 46 \\ Proposed PTSAD & 134 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Execution time and false matching rate of different matching methods for the second video. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Exec. Time (s)** & **False Matching Rate (\%)** \\ \hline SIFT & 303 & 19 \\ Full-search NCC & 267 & 45 \\ Full-search SAD & 154 & 59 \\ Proposed PTSAD & 53 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Execution time and false matching rate of different matching methods for the first video. Figure 22: The value of \(d_{c}\), \(d_{h}\) and \(d_{v}\) for 225 frames in the first video. ## 6 Conclusions

This paper proposed a novel approach to generate a complete borehole-wall cylindrical panorama from the forward-looking borehole video acquired by the axial view borehole camera system (AVBCS). Specifically, our system consisted of three main modules: Drilled hole center positioning, front view image unwrapping and an unfolded image mosaic. Through the image unwrapping module, the annular effective regions in front view image sequences were unfolded to the rectangular unfolded image sequences. Thus, it could convert the forward motion to the translational motion in respect of the motion vector estimation.