# Research on the Positioning Method of Steel Belt Anchor Holes Applied in Coal Mine Underground
## 4 Realization of Steel Belt Anchor Hole Positioning
### Target Data Extraction  
The voltage values collected in the above data are obtained from the collected voltage matrix according to the number of rows representing different horizontal coordinates and the number of columns representing different vertical coordinates \(\left\{V_{xy}\right\}\), where \(V\) is the voltage value, and \(x\) and \(y\) are the horizontal and vertical coordinates of that voltage value. To obtain the target data in the region where the anchor holes are located, global threshold segmentation [26] is used, where only one threshold value is used in the whole matrix to divide the matrix into two regions, i.e., the target object and the background object. The extraction process of the anchor hole boundary is shown in Figure 10.  
Figure 10: Flowchart of anchor hole boundary extraction.  
Figure 9: Voltage values at different positions.  
The anchor hole in the steel belt is circular and its area is noted as \(S_{1}\). Scanning the elements in the voltage matrix yields a voltage maximum value of \(V_{\text{max}}\), and a voltage minimum value of \(V_{\text{min}}\). The sensor outputs the lowest voltage value when it detects the groove at the bottom of the steel belt, and it outputs the highest voltage value when it detects the air outside the steel belt. The voltage value is close to the highest voltage value when it detects the anchor holes. The initial voltage global threshold value is set as follows:  
\[V_{0}=0.9(V_{\text{max}}-V_{\text{min}})+V_{\text{min}} \tag{1}\]  
In the equation, \(V_{0}\) is the initial voltage global threshold; \(V_{\text{max}}\) is the maximum voltage value; and \(V_{\text{min}}\) is the minimum voltage value.  
The data in the voltage matrix are segmented into target object and background according to Equation (2), which is given below:  
\[G_{xy}=\left\{\begin{array}{l}1,V_{xy}>V_{0}\\ 0,V_{xy}\leq V_{0}\end{array}\right. \tag{2}\]  
In the equation, \(x\) is the horizontal coordinate of the point; \(y\) is the vertical coordinate of the point; \(V_{xy}\) is the voltage value; and \(G_{xy}\) is the binarized value.  
The voltage matrix becomes a binarized matrix consisting only of 0 and 1 after the voltage matrix is segmented through the threshold. When the value in the binarized matrix is 0, the position of the value is indicated by a black dot, and the result is shown in Figure 11. The irregular edges and shapes appear because the steel belt is tilted and some areas of the belt itself are defective during the detection process of the inductive sensor, resulting in fluctuations and noise in the collected data.  
Then, the boundary points are extracted and the binarized matrix is iterated. When the value is 1 and 0 appears near the value, the position of the value in the matrix is recorded. After the end of the iteration, the position where the value 1 of the recorded position is indicated by a black dot, and the value of the unrecorded position in the matrix is set to 0. As shown in Figure 12, the boundary points contain the boundaries of the anchor holes and the boundaries of the steel belts. When setting the initial voltage global threshold, the boundary extracted after threshold segmentation will be unable to respond to the anchor hole information, so through the adaptive threshold generation and correction strategy [27],  
Figure 11: Binary map after threshold segmentation.  
the neighboring points in the obtained boundary points are connected, and the largest area \(S_{2}\) in the enclosed graph and the area of the anchor hole of the steel belt \(S_{1}\) are taken for comparison to adjust the global threshold \(V_{0}\). When \(0.8S_{1}\leq S_{2}\leq S_{1}\), the threshold segmentation ends. When \(S_{2}<0.8S_{1}\), the threshold value \(V_{0}\) should be reduced and changed to \(V_{0}=V_{0}-5\), and the threshold segmentation is repeated; when \(S_{2}>S_{1}\), the threshold value \(V_{0}\) should be increased and changed to \(V_{0}=V_{0}+5\), and the threshold segmentation is repeated.