# Extraction and Detection of Surface Defects in Particleboards by Tracking Moving Targets
## 5 Calculation and Analysis of Defect Characteristic Parameters
### The Analysis of Surface Defects  
Fuzzy pattern recognition is used to analyze surface defects in particleboards according to the obtained defect characteristic parameters [28; 29; 30; 31]. Considering the feature of the characteristic parameters, the method of group identification was adopted in this study to solve the problem, while the Hamming distance, Euclid distance, and dose-approximation value were selected as the evaluation indexes. Considering \(M\) and \(N\) are the fuzzy subsets on the domain \(U=\{u_{1},u_{2},\ldots,u_{n}\}\), the Hamming distance between the fuzzy sets \(M\) and \(N\) can be expressed as follows:  
\[d_{p}(A,B)=\sum\limits_{i=1}^{n}\lvert A(x_{i})-B(x_{i})\rvert \tag{20}\] \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Defect Target** & **Frame 1** & **Frame 2** & **Frame 3** & \(\ldots\) & **Frame 28** & **Frame 29** & **Frame 30** \\ \hline Defect \(a\) & 67.33 & 68.95 & 68.02 & \(\ldots\) & 68.34 & 68.35 & 68.33 \\ Defect \(b\) & 86.99 & 87.73 & 87.50 & \(\ldots\) & 87.31 & 87.29 & 87.28 \\ Defect \(c\) & 88.82 & 88.31 & 88.53 & \(\ldots\) & 88.36 & 88.37 & 88.38 \\ Defect \(d\) & 90.94 & 91.21 & 91.29 & \(\ldots\) & 90.92 & 90.90 & 90.91 \\ Defect \(e\) & 67.07 & 67.74 & 67.33 & \(\ldots\) & 67.49 & 67.47 & 67.46 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The results of defect depth calculation of surface defect targets. The Euclid distance between fuzzy sets \(M\) and \(N\) can be expressed as follows:  
\[d_{p}(A,B)=\left(\sum_{i=1}^{n}\lvert A(x_{i})-B(x_{i})\rvert^{2}\right)^{\frac{ 1}{2}} \tag{21}\]  
\(M\) and \(N\) are essentially \(1\times n\) vectors. The inner product of \(M\) and \(N\) can be expressed as follows:  
\[M\circ N=\underset{x\in U}{\vee}(M(x)\wedge N(x)) \tag{22}\]  
The outer product can be expressed as follows:  
\[M\odot N=\underset{x\in U}{\wedge}(M(x)\lor N(x)) \tag{23}\]  
The dose-approximation value of \(M\) and \(N\) can be expressed as follows:  
\[\sigma_{0}(M,N)=\frac{1}{2}[M\circ N+(1-M\odot N)] \tag{24}\]  
It can also be written as follows:  
\[\sigma_{L}(M,N)=(M\circ N)\wedge(M\odot N)^{C} \tag{25}\]  
The final pattern recognition result is obtained according to the principle of proximity selection. Considering \(M_{1},\ldots,M_{i},M_{i+1},\ldots,M_{n}\) are the fuzzy models on domain \(U\), and \(N\) is the object to be identified, if there is \(\sigma(M_{i},N)=\max\{\sigma(M_{1},N),\sigma(M_{2},N),\ldots,\sigma(M_{n},N)\}\), \(N\) will be considered to belong to fuzzy model \(M_{i}\). In this study, the surface defects of the particleboard were divided into \(P_{1}\), \(P_{2}\), and \(P_{3}\) grades. The required indexes are shown in Table 3.  
From Table 3, we can obtain that the standard fuzzy sets of the first-class, second-class, and third-class boards were \(M_{1}=[0.6,0.5,0.6]^{T}\), \(M_{2}=[0.3,0.4,0.3]^{T}\), and \(M_{3}=[0.1,0.1,0.1]^{T}\), respectively. The surface quality indexes of the experimental particleboards are shown in Table 4. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Name of parameter** & \(A\) & \(B\) & \(C\) \\ \hline Number of defects & 0.40 & 0.60 & 0.40 \\ Total area of defects & 0.40 & 0.70 & 0.05 \\ Maximum depth of defects & 0.35 & 0.35 & 0.20 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Surface quality indexes of the experimental particleboards. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Name of Parameter** & \(P_{1}\) & \(P_{2}\) & \(P_{3}\) \\ \hline Number of defects & 0.6(\(\leq\)1) & 0.3(\(\leq\) 3) & 0.1(\(>\)3) \\ Total area of defects & 0.5(\(\leq\)1500) & 0.4(1500\(<\)\(a\)\(\leq\)5000) & 0.1(\(>\)5000) \\ Maximum depth of defects & 0.6(\(\leq\)70) & 0.3(70\(<\)\(a\)\(\leq\)90) & 0.1(\(>\)90) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Surface quality indexes of the standard particleboard.