## 4 Methods
### Mosaic of borehole Video
#### 4.3.2 Proposed PTSAD Algorithm
Then, in the image mosaic process, we presented a new PTSAD algorithm to achieve video image matching, which introduced the gray projection transformation (GPT) into the sum of absolute difference (SAD) algorithm to ensure the accuracy of the matching results. In addition, we proposed drilled hole center positioning and image filtering modules to eliminate the impact of camera vibration and remove the invalid frames respectively. The experiments verified that our system could generate the borehole-wall panorama effectively and precisely. With our method, the forward-looking borehole video could be converted to the corresponding borehole-wall cylindrical panorama. Then engineers could analyze the borehole information quantitatively using the cylindrical panorama, including features such as the distribution and width of a fracture, the thickness and inclination of a coal seam, the strike, dip, dipping direction and developing degree of the structure plane. Furthermore, the proposed method provides a new idea for the video

Figure 24: Borehole-wall cylindrical panorama generated from the second video. Figure 23: Borehole-wall cylindrical panorama generated from the first video. image mosaic of the forward movement camera. However, complexities involving filling materials in fracture space, studying the lengths, width and inclination of different fractures was not accomplished in this study. In our future work, we will consider studying the geometric parameters of rock mass structural planes and extending our work to multiple fields, such as pipeline inspection, nondestructive evaluation of gun muzzles and image analysis of an endoscopic video in medical applications. [PERSON] conceived the ideas, designed the experiments, and wrote the paper. [PERSON] and [PERSON] performed the experiments and analyzed the results. [PERSON] and [PERSON] revised the manuscript. This research received no external funding. The authors declare no conflict of interest. ## References

* [PERSON] et al. (2016) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON] ISRM suggested method for in situ microseismic monitoring of the fracturing process in rock masses. _Rock Mech. Rock Eng._**2016**, _49_, 343-369. [CrossRef]
* [PERSON] and [PERSON] (2010) [PERSON]; [PERSON] Application of borehole optical televiewing to investigating the 3-D structure of glaciers: Implications for the formation of longitudinal debris ridges, midre Lovenbreen, Svalbard. _J. Glaciol._**2010**, _56_, 143-156. [CrossRef]
* [PERSON] et al. (2015) [PERSON]; [PERSON]; [PERSON]; [PERSON] The use of borehole video in investigating the hydrology of a temperate glacier. _Hydrol Process._**2015**, _11_, 211-224. [CrossRef]
* [PERSON] et al. (2013) [PERSON]; [PERSON]; [PERSON]; [PERSON] ISRM Suggested Method for Rock Fractures Observations Using a Borehole Digital Optical Televiewer. _Rock Mech. Rock Eng._**2013**, _46_, 635-644. [CrossRef]
* [PERSON] et al. (2010) [PERSON]; [PERSON]; [PERSON] Borehole observation methods in coal and rock mass and their applications. _J. China Coal Soc._**2010**, _35_, 1949-1956. * [PERSON] and [PERSON] (2014) [PERSON]; [PERSON] Evaluating selected lithological features using photographs taken with an introscopic camera in boreholes. _Int. J. Rock Mech. Min. Sci._**2014**, _72_, 319-324. [CrossRef]
* [PERSON] et al. (2017) [PERSON]; [PERSON]; [PERSON]; [PERSON] Synthetic aperture photography using a moving camera-IMU system. _Pattern Recognit._**2017**, _62_, 175-188. [CrossRef]
* [PERSON] et al. (2016) [PERSON]; [PERSON]; [PERSON]; [PERSON] Node localization in robotic sensor networks for pipeline inspection. _IEEE Trans. Ind. Inf._**2016**, _12_, 809-819. [CrossRef]
* [PERSON] et al. (2015) [PERSON]; [PERSON]; [PERSON] [PERSON] Optimal Spatial Resolution of Omnidirectional Imaging Systems for Pipe Inspection Applications. _Int. J. Optomechatron._**2015**, \(9\), 261-294. [CrossRef]
* [PERSON] et al. (1997) [PERSON]; [PERSON]; [PERSON] [PERSON] Mosaicing with Generalized Strips.