基于Python-OpenCV图像处理技术的小麦不完善粒识别研究

    Research on imperfect wheat grain recognition based on Python-OpenCV image processing technology

    • 摘要: 为解决传统图像采集时采集到的图像不能实时传输到计算机并及时标记处理、镜头与载物板之间距离不易控制、光源不均、籽粒必须整齐摆放等问题,以及为实现图像处理技术在小麦不完善粒识别中的应用,设计一个采集小麦图像的简易装置,研究一种基于OpenCV计算机视觉库和Python语言的小麦不完善粒图像处理方法,并结合Keras框架的VGG16神经网络模型对小麦籽粒进行识别测试。通过对采集到的不同类型的小麦籽粒图像进行图像增强与形态学处理后,执行k均值聚类图像分割和统一处理,将小麦单籽粒图像建成图像数据库用于Keras框架下的VGG16神经网络模型训练,训练得到的模型对小麦不完善粒与完善粒进行检测识别。结果表明,使用Python-OpenCV图像处理技术可显著增强小麦籽粒图像外观特征,在此基础上的VGG16神经网络模型对小麦图像中随机分布的不完善粒识别准确率高达85.4%。此图像处理方法可有效用于小麦不完善粒的识别,可为小麦不完善粒的智能、快速、无损检测设备的研发提供理论支撑。

       

      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.

       

    /

    返回文章
    返回