## 3 Methods of Classification and Establishing Data Sets
### Sample Data Collection  
Based on the analysis in Section 3.1, the gray distribution of stripe is used as the sample. It can not only improve the training accuracy, but also reduce the training difficulty and training time. We divided the cross-sectional grayscale distribution into two categories, corresponding to defect-free and defective stripe sections, as shown in Figure 9. One is the grayscale distribution, which is not degenerated, as shown in Figure 9,b. The other one is the grayscale distribution degenerated, as shown in Figure 9c-e. Among them, the stripe cross-section in Figure 9c is degenerated due to object surface deformation, the stripe cross-section in Figure 9d is degenerated due to object surface color change, and the stripe cross-section in Figure 9e is degenerated due to specular reflection from the object surface. In addition, there are many other factors, such as noise from the measurement system and  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Performance** & **18-Layer** & **34-Layer** & **50-Layer** & **101-Layer** & **152-Layer** \\ \hline FLOPs & \(1.8\times 10^{9}\) & \(3.6\times 10^{9}\) & \(3.8\times 10^{9}\) & \(7.6\times 10^{9}\) & \(11.3\times 10^{9}\) \\ Top-1 Err. on ImageNet & 27.88 & 25.03 & 22.85 & 21.75 & 21.43 \\ Validation Set (\%) & & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Performance Comparison of Five Models of Residual Neural Network Model [33].  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Advantages** & **Disadvantages** \\ \hline Threshold Method & Fast and simple. & Low extraction accuracy. \\ \hline Extreme Value Method & Fast and simple. & Easily disturbed by noise. \\ \hline Curve Fitting Method & Less affected by noise, high accuracy. & Low robustness and slow calculation speed. \\ \hline Steger Algorithm & High accuracy and robustness. & Slow calculation speed. \\ \hline \hline \multirow{2}{*}{Grayscale Gravity Method} & High accuracy, high noise resistance, and high efficiency. & Low sensitivity. \\ \end{tabular}
\end{table}
Table 3: Comparison of Several Typical Stripe Center Extraction Methods.  
the measurement environment, that can cause degradation of the grayscale distribution of the stripe cross-section.  
Objects with different shapes and materials are used, which include ceramic cups, bearing steel balls, flat board, plaster Venus sculptures, plaster balls, etc. The encoded structured light stripe pattern is projected onto the objects. From this, 6450 stripe cross-sectional grayscale distribution images are selected and manually classified into two types of defective and defect-free as the data set, and their composition is shown in Table 4.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Type** & **Number of Train Set Images** & **Number of Test Set Images** \\ \hline Defective stripes & 3320 & 830 \\ Defect-free stripes & 1840 & 460 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Composition of the Data Set.  
Figure 8: Structured Light Stripe Cross-Section.  
Figure 7: Grayscale Distribution of Structured Light Fringes. (**a**) Gaussian Grayscale Distribution; (**b**) Sinusoidal Grayscale Distribution; (**c**) Rectangular-Type Grayscale Distribution.