## 2 Materials and Methods
### Reference Measurements Statistics and Spectral Data Processing  
Statistical analysis of meat quality measurements (fillet color, pH, WBSF, and CL values) were conducted using the SPSS software (SPSS version 19.0, IBM Corporation, Armonk, NY, USA, 2010). Means of the different groups were separated using student's \(t\)-test procedure with the level of \(p<0.1\). Prior to the establishment of classification models, all the samples were partitioned into the calibration set and prediction set based on a ratio of approximately 2:1. That is, 50 samples of high-CL (\(n=25\)) and low-CL (\(n=25\)) were attributed to the calibration set and the others to the prediction set. With regards to multivariable spectra analysis, several preprocessing techniques, including standard normal variate (SNV), multiplicative scatter correction (MSC), and derivatives (first- and second-order, Der1 and Der2) based on the Savitzky-Golay algorithm with a third-order polynomial fitting within a moving window of a width of 15, were separately applied to the spectra. Two modeling methods were applied. One was linear partial least square-discriminant analysis (PLS-DA) algorithm and the other was nonlinear radial basis function support vector machine (RBF-SVM) algorithm. PLS-DA predicts the values and assigns samples into their corresponding groups based on the modeling with PLS regression [41]. The latent variables (LVs) are orthogonal directions in the space of the sample matrix characterized by maximizing the covariance with the pre-defined classes. The class of unknown samples was assigned based on the predicted Y value and the classification threshold of the developed model. The smallest number of LVs at the minimum value of the corresponding error rate of venetian blinds cross-validation was chosen. With regards to the RBF-SVM method, the RBF was used as the kernel function of SVM and optimal separation of groups was achieved based on statistical learning [42]. In this study, the parameters of \(c\) and \(g\) for the RBF-SVM method were chosen  
Figure 2: The main steps of image segmentation. (**a**) Whole meat mask (band 695–band 422); (**b**) Lowest reflectance image (band 422); (**c**) Highest reflectance image (band 695); (**d**) Irregular shadow mask; (**e**) Specular reflection or fat mask; (**f**) Muscle tissue mask to be used as the region of interest (ROI). in an automatic optimization process. Finally, the performance of established models was evaluated by calculating correct classification rate (CCR) in both the calibration set and the prediction set, which is expressed by the following equation:  
\[\text{CCR}=\frac{\text{N}_{1}}{\text{N}_{2}} \tag{3}\]  
where CCR represents the correct classification rate, N\({}_{1}\) is the number of correctly classified samples in the calibration or prediction set, and N\({}_{2}\) is the total number of samples in the calibration or prediction set. Classification performance was further assessed in terms of sensitivity and specificity. Sensitivity was estimated as the number of positives in the dataset corrected by the model divided by the total number of positives. Specificity was determined as the number of negatives correctly classified divided by the total number of negatives. The definitions of the two indicators are as below:  
\[\text{Sensitivity}=\frac{\text{TP}}{\text{TP}+\text{FN}} \tag{4}\]  
\[\text{Specificity}=\frac{\text{TN}}{\text{TN}+\text{FP}} \tag{5}\]  
where TP, TN, FN and FP denote the true positive, the true negative, the false negative and the false positive, respectively. Uninformative variable elimination (UVE) and competitive adaptive reweighted sampling (CARS) are employed to identify and select informative variables for model optimization, respectively. UVE is a variable selection method based on stability analysis of the regression coefficient (RC) in the partial least squares regression (PLSR) model. A noise matrix with the same dimensions is added to the original spectral data matrix, and the PLSR model is built by the combined data [43].