## 2 Methods
### Centre Point Extraction  
The center point of the pattern is defined as the center of the region enclosed by the pattern outline. The area is defined as the number of pixels of a region. The center is calculated as the mean value of the line or column coordinates, respectively, of all pixels. The proposed method detected the approximate position of the pattern using the Faster R-CNN, and then an automatic threshold method was used to divide the pixel points of the pattern region and calculate the center coordinates. The steps are as follows:  
**Step 1**: Image cropping method with overlapping areas is used for image cropping. The original image (Figure 7a) with size of \(1208\times 1024\) pixels is cropped into several sub-images (Figure 7b-e) of \(640\times 512\) pixels. The moving step length of the image cropping is approximately twice the length of the pattern period. **Step 2**: The Faster R-CNN model is used to detect the pattern and output the classification score and categories. (Figure 7f-i). **Step 3**: Merge sub-image \(F_{subi}\) according the coordinates of image cropping, obtaining image \(F_{new}\) (see Figure 8b). For example, define the coordinates of sub-image as (\(x_{sub}\), \(y_{sub}\)), and the coordinates in image \(F_{new}\) as (\(x_{ori}\), \(y_{ori}\)), so the coordinates (\(x_{ori}\), \(y_{ori}\)) are computed as follows:  
\[(x_{ori},y_{ori})=(x_{sub}+s_{x}\times(i-1),y_{sub}+s_{y}\times(j-1)) \tag{1}\]  
where \(s_{x}\) and \(s_{y}\) are, respectively, the horizontal moving step length and the longitudinal moving step length. The variables \(i\) (\(i\) = 1, 2, 3... ) and \(j\) (\(j\) = 1, 2, 3... ), respectively, represent the times of horizontal and vertical cropping. Then combine the overlapping bounding boxes into one large bounding box according the maximum coordinates of overlapping bounding boxes, getting image \(F_{new1}\) (see Figure 8c). **Step 4**: Correct the inaccurate bounding boxes and calculate the center points of the patterns to get the original center point map. First, the grey distribution information of the original image is counted by the grey histogram and the average grey value \(G_{th}\) is calculated. Second, \(G_{th}\) is used as a threshold to segment the patterns in the bounding boxes and calculate the area \(S_{i}\) (\(i\) = 1, 2... ) of segmented pattern, the average value \(S_{av}\) of \(S_{i}\), the center point \(P_{p}\) of the pattern, and the center point \(P_{b}\) of the bounding box. Third, compare the size of \(S_{i}\) and \(S_{av}\), and remove the bounding boxes which \(S\leq S_{av}\). Fourth, adjust the positions of bounding boxes by moving the bounding boxes toward \(P_{p}\) to make \(S>S_{av}\). Finally, segment the patterns \(f\) in the corrected bounding boxes using the threshold  
Figure 6: Precision–recall (P–R) curve of pattern detection by Faster R-CNN. The longitudinal axis indicates the detection precision, and the horizontal axis indicates the recall ratio. The area enclosed by the curve represents the mean average precision of the pattern detection. segmentation method and calculate them center points to obtain the original center point map (see Figure 9a). \[f(x,y)=\left\{ \begin{array}{ll}1&f(x,y)>G_{th}\\ 0&f(x,y)\leq G_{th}\end{array} \right.. \tag{2}\]  
**Step 5**: Missing center points are filled based on four-neighbor-method to obtain the final center point map (see Figure 9c). First, approximately wert period length \(T_{hx}\) and approximately warp period length \(T_{hy}\) are counted from the original center point map. Second, the missing center point is between two known adjacent points \(A\) and \(B\). If \((k+1/2)<T_{hx}<d_{m}<(k+3/2)\)\(T_{hx}\), where \(k=1\), \(2\dots\), and \(d_{m}\) is the distance between two adjacent corners \(A\) and \(B\), then fill in k missing center points uniformly on the line \(AB\). Suppose the filled point is \(N\). Third, find two adjacent points \(C\) and \(D\) of \(N\) in the longitudinal direction.