## 4 Detailed Proposed Technology and Test Results
### Acquisition of High-Quality Deep Learning and Inspection Data
1.2 Automatic Correction Algorithm for Image Matching Deviation Caused by Positional Precision Error  
Additional hardware improvements to increase the positional accuracy would require excessive cost and time to reduce the deviation in the images acquired from the mobile robot or arm. In the industrial field, there is a trade-off between performance improvement and cost; therefore, an appropriate performance improvement method must be developed. In this study, we propose a visual software algorithm that can correct image deviation with relatively low investment cost. We used the speeded-up robust feature (SURF) algorithm to detect feature points between the first image and the repeatedly acquired images, and corrected the deviation using affine, projective, and other transformation techniques [12,13]. However, during feature point detection, there were problems with recognizing the background as a feature point instead of the inspection area, or recognizing parts incorrectly installed as the same feature point, resulting in degraded performance, as shown in Figure 4  
Figure 3: Improvement in repeat positioning accuracy with the centering technique using the Fiducial Mark. (top). To address this issue, we limited the feature point search area to the vehicle body, as shown in Figure 4 (bottom). This prevents the recognition of the background as a feature point outside the vehicle body. Additionally, the image-matching performance is improved by masking the part area and excluding it from the search area to prevent the recognition of incorrect feature points when parts are installed incorrectly. \[\text{argmax}\left(x,y\right)\in R\cap M\sum i,jH_{ij}L_{\sigma}(x+i,y+j) \tag{1}\]  
\[\text{argmax}\left(x,y\right)\in M\sum i,jH_{ij}L_{\sigma}(x+i,y+j) \tag{2}\]  
\[\text{argmax}\left(x,y\right)\in I\sum i,jH_{ij}L_{\sigma}(x+i,y+j) \tag{3}\]  
Equation (1) is used to detect features within the intersection of the search area specified by the reference image's feature search area, \(R\), and the image mask, \(M\), that includes the areas outside the feature search area. \(H_{ij}\) represents the Gaussian kernel used in the Harris corner detector, and \(L_{\sigma}(x+i,y+j)\) represents the result of differentiation and smoothing using the image's Rob operator with a Gaussian filter. \((x+i,y+j)\) represents the position of the kernel. Conversely, there are two ways to perform a feature search on a newly acquired image. If the image distortion is small, Equation (2) can be used, which utilizes the image mask, \(M\), that includes the areas outside the feature search area. In this case, the area for feature detection is reduced since the same image masking area is included, resulting in an increase in the speed. However, it was observed that the accuracy of feature detection decreases with the increase in the image distortion. This is because the difference between the reference image and the masked area caused by the image distortion is severe. To improve this, \(I\) represents the entire area of the newly acquired image, enabling the feature search area to be assigned without a separate mask, as shown in Equation (3). This improves the alignment performance. However, it was also observed that the expansion of the search area increases the time required by approximately 30%. Therefore, Equation (2) must be used when the image distortion is small, and Equation (3) must be used appropriately when the distortion is significant. Consequently, only the feature points of the vehicle body that do not change before and after mounting the parts were detected, as shown in Figure 5; further, the image registration algorithms can be  
Figure 4: (**a**) Image registration and cropping using the proposed algorithm, (**b**) quality scoring of cropped images, (**c**) changes in AI accuracy according to cropped image quality. implemented through the image conversion methods, affine and Projective Transform, using the feature points between the two detected images [14].