# Optical Element Surface Defect Size Recognition Based on Decision Regression Tree
## 4 Results and Discussion
### Experiment of Scratch Width Recognition  
To further verify the training result of DRT in Section 4.3, the standard glass plate with the process of electron beam exposure and the ion beam etching is taken as the scratch samples, as shown in Figure 10, and the DRT, which has completed training from simulation data, is applied to recognize the width of these scratch samples. The actual scratch width is measured by a scanning electron microscope (SEM) as a reference. The scratches whose width is in the range of 0.61-5.19 \(\upmu\)m are taken as the test samples. The experiment set up is introduced in Section 2. The incident light from the white LED irradiates on the optical element surface, and a part of them is scattered by the scratch. The scattered light is firstly focused on by the objective lens of our MSDI system with the magnification of 9.7\(\times\) and the numerical aperture of 0.15 and then collected by CCD. The single-pixel size of CCD is 3.45 \(\times\) 3.45 \(\upmu\)m, and the photosensitive area of CCD is 8.47 \(\times\) 7.10 mm. Finally, CCD transmits the image to the computer, and DRT is applied to recognize the width of these scratches. The scratch width recognition is executed on the MATLAB (R2017a), Windows 10 64-bit operating system (Intel Core i7-8550 CPU, 8G RAM). Figure 9: The width recognition absolute error of the 150 random v-shaped cross-section scratches. Inset: the sketch of the random v-shaped scratch cross-section. The width recognition result of the tested scratches samples is shown in Table 3. The conventional image processing method (Otsu threshold segmentation) is also employed as a comparison to the DRT. As for the scratches whose real width is 0.61 \(\upmu\)m and 1.17 \(\upmu\)m, the Otsu method has a large error, and the relative error of the Otsu method even exceeds 100% in recognition of the scratch width of 0.61 \(\upmu\)m, while the relative error of DRT is between 5.1% and 10%. This is because the scratch width of 0.61-1.17 \(\upmu\)m is close to the wavelength of the light source (0.4-0.75 \(\upmu\)m), and the diffracted light will occur when the incident light is scattered by the scratch. Besides, the limit of the aperture to the scattered and diffracted light will cause the second diffraction. Thus, the gray distribution of the scratch will largely broaden, which leads to the recognition result of Otsu that is larger than the result in the situation where the gray distribution doesn't broaden. Since the DRT is trained by learning the light intensity distribution of different width scratches, the gray distribution broadening caused by diffraction has less effect on DRT than the Otsu method. As for the scratches whose real width is 2.23 \(\upmu\)m and 3.24 \(\upmu\)m, the relative error of the Otsu method is between 11.4% and 31.4%, while the relative error of DRT is between 1.5% and 4.9%. It indicates that the effect of diffraction on the two methods decreases with the increase in the real width of the scratch. For the scratches whose real width is 4.22 \(\upmu\)m and 5.19 \(\upmu\)m, the relative error of the Otsu method is in the range of 2.1-2.9%, and the relative error of DRT is in the range of 1.2-2.1%. Since DRT is essentially a regression method, the exponential nonlinear regression is carried out as a comparison to DRT. In Table 3, the exponential regression method shows good performance in the defect size range of 3.24 \(\upmu\)m to 5.19 \(\upmu\)m, and its relative error is between 2.7% and 3.4%, which is close to the DRT and is better than the Otsu method. However, for the defect size range of 0.61 \(\upmu\)m to 2.23 \(\upmu\)m, the relative error of the exponential method increases a lot and is far beyond the relative error of DRT. Hence, compared with the Otsu method and exponential regression method, the DRT can achieve relatively higher precision recognition.