# Detection and Classification of Bearing Surface Defects Based on Machine Vision
## 3 Materials and Methods
### Feature Selection and Extraction  
To accurately identify the type of bearing surface defects, it is necessary to select efficient classification features. We proposed the comprehensive use of a practical algorithm that combines scalar feature selection [25; 26; 27; 28; 29; 30; 31], correlation analysis [27; 28], and vector selection [29; 30], abbreviated as the SCV algorithm. The SCV feature selection algorithm is mainly divided into the following four steps:  
* Establish a feature pool. Collect as many features of the classified object as possible and combine them into a set of candidate features. * Perform data acquisition and processing. Complete the conversion of a sample from an image to a normalized feature vector through the steps of image acquisition, image processing, and feature calculation. * Set a target of dimension reduction. Make a comprehensive determination of the number of features to be used for classification based on the dimension of features in the feature pool, peak phenomenon, and number of training samples. * Perform SCV feature selection. Based on the sample data and the dimensionality reduction target, use the designed feature selection algorithm to select a set of features from the feature pool with good classification performance. First, rank the features by their classification performance, from good to poor, based on the separability criterion to realize the conversion from feature pool \(X\) to feature vector \(x(d)\). Second, perform correlation analysis between features to eliminate strongly correlated features and reduce the dimensionality of the feature vector from \(x(d)\) to \(x(d_{1})\). Then, carry out a scalar feature selection on \(x(d_{1})\), i.e., select only the first \(d_{2}\) features from \(x(d_{1})\) to form a new feature vector \(x(d_{2})\) to complete the second dimensionality reduction. Finally, perform a vector feature selection on \(x(d_{2})\) to select the optimal classification set of \(d^{\prime}\) features from \(x(d_{2})\) to obtain the final classification feature vector (\(d^{\prime}\)). Figure 5: Multi-scale image feature structure: (**a**) pyramid structure of the images; (**b**) cuboid structure of the images. Figure 6: The framework of the multi-neural network segmentation algorithm. According to the above algorithm design, we established a feature selection criterion based on the correlation coefficient. The specific algorithm uses the Fisher criterion for scalar feature selection and \(J_{l}\) as the selection criterion for the feature vector. According to the algorithm procedure, assume that a feature pool, \(X\), has been established, a standardized training sample set, \(T\), has been obtained, and a dimensionality reduction goal, \(d^{\prime}\), has been established. Here, the feature pool has \(d\) features, expressed as \(X=\{x_{l}\}\), (\(l=1\), \(2\),..., \(d\)). Moreover, \(T\) has \(c\) types (\(c\geq 3\)), designated as \(\omega_{1},\omega_{2}\),..., \(\omega_{c}\), respectively, with each type \(\omega_{i}\) having \(N_{i}\) samples, for a total of \(N\) training samples. The aim of \(d^{\prime}\) is to choose \(d^{\prime}\) features as the final classification features from the feature pool of d features. The specific steps are:  
* Perform Fisher discrimination ratio (FDR) feature sequence. The features in the feature pool exist in an aggregate form. For the ease of representation and computation, all features need to be sequenced in a certain order to form a feature vector. They may be ordered according to the FDR in descending order. FDR is used to characterize the separability of a single feature. The larger the FDR value, the better the separability of the feature.