# Calibration and Image Reconstruction in a Spot Scanning Detection System for Surface Defects
## 4 Experiment Results and Discussions
### Experiments of Image Reconstruction  
To test the validity of the system calibration method, the calibrated mapping relationship \(\mathbf{g_{ij}}\) is established to reconstruct an image, called the calibrated image, for the acquired discrete intensity sequence again. Figure 7 presents the calibrated image with an enlarged image of its central area. Compared to the original image (see Figure 6a), the calibrated image shows almost no distortion but a missing area at the center, agreeing with the analysis in Section 3.3. Then, the SS-SDES is adjusted as described in Section 3.3 to scan the standard plate once again and acquire the discrete intensity sequence for image reconstruction. Figure 7 presents the resulting image, called the adjusted image, which is reconstructed using the adjusted system parameter vector \(\dot{\psi}^{{}^{\prime}}\). It can be observed that the missing area at the center does not exist while the adjusted image remains undistorted. Moreover, Figure 7c presents an enlarged image of the scratches with widths of 0.5-6 \(\upmu\)m. All of them can be identified clearly with high contrasts. Therefore, it can be estimated that the minimum detectable size of the SS-SDES is less than 0.5 \(\upmu\)m. For a quantitative evaluation of the image distortion, the maximum straightness errors and the distance errors introduced above are computed for the scratches and dig pairs in the image after extraction of feature points. Figure 8a shows the maximum straightness errors comparison for different scratches between the original image (marked by circles) and the adjusted image (marked by triangles). It can be observed that some of the errors in the original image are more than 50 pixels, while those in the adjusted image are all within 1.8 \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Parameter** & \(\theta_{r}\) (\(\dot{\tau}\)) & \(\varphi_{r}\) (\(\dot{\tau}\)) & \(\theta_{i}\) (\(\dot{\tau}\)) & \(\varphi_{i}\) (\(\dot{\tau}\)) & \(x_{i}\) (\(\upmu\)) & \(y_{i}\) (\(\upmu\)) & \(\upmu\) (\(\upmu\)) & \(\upmu\) (\(\upmu\)) & \(\upmu\) (\(\upmu\)) \\ \hline setting value & 0 & 0 & 135 & 90 & 0 & 0 & 20 & 4 & \(1.7\times 10^{6}\) \\ calibrated value & 0.038 & 102.08 & 134.99 & 88.83 & 37.45 & 960.52 & 20.034 & 4.000060 & 54.60 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: System calibration results. Figure 7: Reconstructed images after system calibration. (**a**) Calibrated image; (**b**) Adjusted image; (**c**) Enlarged image of the scratches with widths of 0.5–6 \(\upmu\)m.  
pixels. The reduction is significant. Figure 8b presents the distance errors of dig pairs in the adjusted image, plotted by the actual distance on the horizontal axis. As can be seen, the distance errors are within 0.7 pixels for all the dig-pairs with different actual distances that range from 0 to about 11 mm. It means that in a defect detection based on this image, the actual geometric features of defects, such as location and length, can be extracted with subpixel accuracy. Since there is a certain error in the extraction of feature points, the results about the distortion correction are acceptable. Additionally, to verify the effectiveness of the proposed image reconstruction method based on weighted average, the nearest-neighbor interpolation method [25] is exploited to reconstruct another image as a comparison. Figure 9 presents the gray value distributions in particular background areas of the images reconstructed by the proposed method (on the left) and the nearest-neighbor interpolation method (on the right). Figure 9a,b corresponds to a same area near the image center, with the gray value standard deviation of 0.98 and 2.48, respectively. As can be seen, the proposed method can produce a more uniform background, which is important for the following image processing to extract defects. As for the background area far from the center, as shown in Figure 9c,d, our method can eliminate the no-value pixels effectively.