Walnut Appearance Defect Detection Based on Computer Vision
Article
Figures
Metrics
Preview PDF
Reference
Related
Cited by
Materials
Abstract:
For rapid and accurate identification of the appearance defects (black spots, ruptures) of walnuts, an image acquisition device was established to collect sample images. After pretreatment, the background was removed by morphological and logical operations. Then, 18 color feature parameters and 20 texture feature parameters were extracted based on the sample images. Morphological and logical operations were used to extract the ratio of the defect portion to the projected pixel area of the sample, as well as the Euler number of the binary image after the sample image threshold was segmented. regression coefficient (RC) and successive projections algorithm were used to optimize the feature parameters and establish a partial least squares (PLS) model. The results showed that the model established based on the preferred SPA method exhibited the optimal performance. The five preferred feature parameters extracted by SPA method were used as input to establish the least squares support vector machine (LS-SVM) model, which was used to predict the prediction set samples. The results showed that the discrimination of normal walnut, walnut with black spot(s) and cracked walnut was accurate with rates as 88.9%, 83.3% and 94.6% respectively, and the overall accuracy rate of discrimination was 88.9%. The method established in this study can well detect the appearance defects of walnut and provides technical support for online detection and sorting of walnut in the future.