| In order to solve the problem of insufficient objectivity in traditional oil color detection methods, a machine vision based soybean oil color prediction model was established.Firstly, the images of soybean oil with different color grades were collected, and median filtering and Canny edge detection algorithm were used to pretreat the oil sample images and extract 9 color features. Then, principal component analysis (PCA) was applied to these features, and with the top three components (F1, F2, F3) that cumulatively explain 9923% of the variance were selected as inputs, Lovibond red and yellow values as outputs, two models of PCA-ANN and PCA-SVR were established. Model parameters were optimized using the LM algorithm, cross-validation, and grid search algorithm, and the performances of the two models were compared. The results showed that the PCA-SVR model had a better prediction effect on soybean oil color, with a coefficient of determination (R2) of 0.96 and a root mean square error of 2.85. In summary, the oil color detection model based on machine vision is completely feasible for rapid detection of soybean oil color. |