# Adaptive Multi-View Image Mosaic Method for Conveyor Belt Surface Fault Online Detection
## 3 Materials and Methods
### Feature-Based Adaptive Partition and Block Registration  
For the IOI, the feature-based adaptive partition and block registration method is further used to improve stitching accuracy. The IOI is segmented adaptively to improve and enhance the efficiency and real-time stitching. The specific operation steps are as follows:  
**Step 1:** A binarization curve is generated for the image partition of interest. Select the \(HM_{i}(u)\) curve and the \(VD_{i}(v)\) curve described in Equation (15) and Equation (17). Construct a one-dimensional filter window with the size of \(L_{f}\), and \(L_{f}\) is an odd number. Slide the filter window on the \(HM_{i}(u)\) curve and \(VD_{i}\) (\(v\)) curve, respectively. The mean of \(L_{f}\) pixels is taken as the value of the center pixel of the window. The \(HM^{{}^{\prime}}_{i}(u)\) curve and \(VD^{{}^{\prime}}_{i}(v)\) curve are obtained after the mean filtering. Then, perform binarization processing according to the following Equation to generate a binarization curve. \[B_{HM_{i}}(u)=\left\{ \begin{array}{ll}1,&HM^{{}^{\prime}}_{i}(u)<F_{i}\\ 0,&HM^{{}^{\prime}}_{i}(u)\geq F_{i}\end{array} \right. \tag{19}\]  
\[B_{VD_{i}}(v)=\left\{ \begin{array}{ll}1,&VD^{{}^{\prime}}_{i}(v)>V_{i}\\ 0,&VD^{{}^{\prime}}_{i}(v)\leq V_{i}\end{array} \right. \tag{20}\]  
where \(F_{i}\) is the mean of \(HM_{i}(u)\), as shown in Equation (16), and \(V_{i}\) is the mean of \(VD_{i}(v)\), which satisfies:  
\[V_{i}=\frac{1}{v_{b}-v_{b}}\sum_{v=v_{a}}^{v_{b}}VD_{i}(v) \tag{21}\]  
**Step 2:** Deal with the region of interest (ROI) of the binarization curve. For \(B_{VDi}(v)\) and \(B_{HMi}(u)\) binarization curves, the region with a continuous value of \"1\" is found as the ROI of the curve, and the start position, end position, and length of the region are marked. The merging threshold \(T_{C}\) of adjacent ROIs and the removal threshold \(T_{B}\) of isolated small ROIs are set in order to solve the influence of scattered and small regions with continuous \"1\" on the partition effect of ROIs. Suppose the interval between 2 adjacent ROIs of \(B_{VDI}(v)\) and \(B_{HMI}(u)\) binarization curve satisfies the condition of less than \(T_{C}\). In that case, the 2 ROIs are merged and connected. If the length of the region is less than \(T_{B}\), the ROI is removed. After the processing, the binarization curves are \(B_{VDI}{}^{\prime}(v)\) and \(B_{HMI}{}^{\prime}(u)\). **Step 3:** The ROI of IOI is generated and selected. A template image with the same size as the overlapping region of the IOI is constructed, and its pixel value is \(g_{i}\) (\(u\),\(v\)). \[g_{i}(u,v)=B_{HM_{i}}{}^{\prime}(u)\times B_{VD_{i}}{}^{\prime}(v)=\left\{ \begin{array}{l}1,(u,v)\in\text{ROI}\\ 0,(u,v)\in\text{background region}\end{array} \right. \tag{22}\]  
where \(u\)\(\in\)[1,\(m\)], \(v\)\(\in\)[\(v_{a}\), \(v_{b}\)]; through Equation (23), the overlapping region of the IOI to be stitched is divided into 1 background region and \(K_{i}\) rectangular ROIs with effective feature points distribution. \[f_{i}^{\prime}(u,v)=f_{i}(u,v)\times g_{i}(u,v) \tag{23}\]  
If \(K_{i}\geq 3\), 2 ROIs with larger size are selected; otherwise, all ROIs are selected. **Step 4:** The image block is generated and selected. The ROI of the image is divided into \(N_{i}\times N_{i}\) blocks, and the number of blocks is \(B_{i}\). If \(B_{i}\geq 3\), 2 image blocks with larger standard deviation are selected; otherwise, all image blocks are selected. The flow chart of adaptive partition and block operation for the IOI is shown in Figure 7.  
We verify the effect of partition operation for the IOI. An IOI with a size of \(2048\times 2048\) (assuming that the whole image is an overlapping region), as shown in Figure 8a, is  
Figure 7: Flow chart of adaptive partition and block operation for the image of interest (IOI). partitioned. The curves of \(HM_{1}(u)\) and its mean, \(VD_{1}(v)\) and its mean are shown in Figure 8c,d. Construct a one-dimensional window template of size 61 (\(L_{f}\) = 61) for mean filtering.