Abstract:
This study is aimed to overcome the problems that the images collected by traditional image collection cannot be transmitted to computer in real time and marked and processed in time, the distance between the lens and the carrier plate is not easy to control, the light source is uneven, and the grains must be arranged neatly, as well to realize the application of image processing technology in the recognition of imperfect wheat grains. In the present study, a simple device for collecting wheat images was designed, and a method for processing imperfect wheat grains based on OpenCV computer vision library and Python language was developed, and the VGG16 neural network model of Keras framework was used to identify and test wheat grains. After image enhancement and morphological processing of the collected images of different types of wheat grains, k-means clustering image segmentation and unified processing were performed, and single-grain images of wheat were built into an image database for VGG16 neural network model training under the Keras framework. The trained model detected and recognized perfect and imperfect wheat grains. The results showed that the adoption of Python-OpenCV image processing technology can significantly improve the morphological characteristics of wheat grain images. Furthermore, the derived VGG16 neural network model can identify randomly distributed imperfect wheat grains in images with an accuracy of up to 85.4%, indicating that this image processing method can be effectively used for the identification of imperfect wheat grains. This study can provide a theoretical basis for the development of intelligent, rapid, and non-destructive testing equipment for imperfect wheat grains.