## 3 Measurement System Measures the Core Algorithm
### Image Preprocessing
\tag{9}\]  
\[\mu=\sum\limits_{i=1}^{M}iP_{i} \tag{10}\]  
Image feature extraction algorithm: an adaptive threshold in the process of detection can effectively differentiate between target and background image, as shown in Figure 7.  
3. Extraction of contour of cross-cutting board edge Deep learning extracts edge contours. Due to the cross-cutting board always being in motion during the straightening process, the traditional Canny algorithm [20; 21; 22; 23; 24] may have the problem of processing lag. Therefore, the latest deep learning edge contour feature extraction is adopted in this paper. In addition to using the Canny algorithm for edge contour extraction, this article also compares it with a new method that employs deep learning to extract edge contours. Deep learning methods:  
Using the manual marking method, carefully annotate each image and draw the contour line of the transverse strip. This process not only improves the recognizability of images, but also provides a necessary foundation for subsequent feature extraction based on deep learning. During the annotation process, curvature constraint annotation specifications and a two-person mutual review mechanism are used to ensure contour accuracy,  
Figure 7: Feature extraction results of the cross-cutting board. ultimately generating a multidimensional annotation file containing coordinate sequences and semantic masks (see Figure 8 for manual calibration results). After completing the manual labeling, as shown in Figure 8, we divided the dataset into different parts, including the cross-cutting board part and the background part, for the purpose of model training and evaluation. Specifically, 70% of the data will be used for training so that the model can learn sufficient features; 15% is used for validation to monitor the performance of the model and adjust hyperparameters. The remaining 15% will be used for testing to evaluate the model's generalization ability on unseen data. Considering the complex imaging variations in industrial scenes, this paper uses an enhanced model for training. The model is based on the U-Net++ architecture for industrial scene adaptation and has attention mechanisms for multi-scale feature extraction and contour prior guidance. To enhance the robustness of the model, a multimodal data augmentation strategy is implemented before training, which specifically includes the following. Luminous domain enhancement: implement \(\pm\)20% brightness adjustment (simulating \(\pm\)10% voltage fluctuations of LED lighting in the workshop), \(\pm\)15% contrast stretching (adapting to the reflection difference of Ra = 0.2-1.6 \(\upmu\)m on the surface of the strip), and \(\pm\)20% saturation perturbation (processing color shift caused by strip surface reflection) in binary images. The training results of the model show that the loss rate is between 0.03 and 0.06, indicating good performance of the model during training and demonstrating good convergence. A low loss rate signifies that the model can effectively learn the features in the dataset without overfitting, as shown in Figure 9.  
Figure 8: Manual calibration results. Figure 9: Training and validation results. In the training results, we observed that the recognition rate of the contour of the strip remained stable at around 99%, indicating that the model performed well in effectively segmenting the transverse board from the background. This high recognition rate indicates that the model can accurately identify the contour of the strip in most cases and successfully capture key information. However, it is worth noting that the model may still encounter some issues in cases of poor image quality or blurring. For example, leakage occurs from time to time, resulting in some strip contours not being correctly identified. Meanwhile, the model may also incorrectly identify multiple points in the background as part of the strip, leading to unnecessary fitting.