宋晨旭, 于翀宇, 邢永超, 李素梅, 贺红, 于慧, 冯献忠. 基于OpenCV的大豆籽粒多表型参数获取算法[J]. 农业工程学报, 2022, 38(20): 156-163. DOI: 10.11975/j.issn.1002-6819.2022.20.018
    引用本文: 宋晨旭, 于翀宇, 邢永超, 李素梅, 贺红, 于慧, 冯献忠. 基于OpenCV的大豆籽粒多表型参数获取算法[J]. 农业工程学报, 2022, 38(20): 156-163. DOI: 10.11975/j.issn.1002-6819.2022.20.018
    Song Chenxu, Yu Chongyu, Xing Yongchao, Li Sumei, He Hong, Yu Hui, Feng Xianzhong. Algorith for acquiring multi-phenotype parameters of soybean seed based on OpenCV[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2022, 38(20): 156-163. DOI: 10.11975/j.issn.1002-6819.2022.20.018
    Citation: Song Chenxu, Yu Chongyu, Xing Yongchao, Li Sumei, He Hong, Yu Hui, Feng Xianzhong. Algorith for acquiring multi-phenotype parameters of soybean seed based on OpenCV[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2022, 38(20): 156-163. DOI: 10.11975/j.issn.1002-6819.2022.20.018

    基于OpenCV的大豆籽粒多表型参数获取算法

    Algorith for acquiring multi-phenotype parameters of soybean seed based on OpenCV

    • 摘要: 大豆籽粒的表型参数获取对大豆育种具有重要的作用。现有的深度学习算法获取的大豆籽粒表型性状较少,且识别表型的神经网络模型训练成本高。该研究基于OpenCV图像处理库,提出了一种提取大豆籽粒多表型参数的算法,从大豆图像中一次性获取籽粒的多种表型性状参数,同时能识别大豆的优劣品质。将每个待测大豆单株的所有籽粒拍成一张图像,首先对大豆籽粒图像进行二值化、去噪等预处理,然后采用分水岭算法和改进的目标分割算法提取图像中的大豆籽粒轮廓。根据大豆籽粒的轮廓信息,调用OpenCV图像处理函数计算大豆籽粒的个数、长轴长度、短轴长度、面积、周长等多个表型性状参数。引入圆形度识别残缺大豆籽粒,使用RGB阈值判断识别病变大豆籽粒。测试结果表明,采用该文算法计算的颗粒总数识别率为98.4%,大豆籽粒正确识别率为95.2%,破损大豆和病变大豆的识别率分别为91.25%和88.94%,籽粒的长轴长度与短轴长度的测量精度分别为96.8%、95.8%;引入多进程并行计算,该算法处理215张图片时间为248.9 s,相对于单进程计算缩短了约2/3,实现了低成本高通量的高精度大豆籽粒多表型性状参数的自动获取,为大豆籽粒自动化考种提供有效的处理方法。

       

      Abstract: Abstract: Phenotypic trait parameters of soybean seeds were greatly contributed to the soybean breeding. Deep Learning, particularly Convolutional Neural Networks (CNN), has been introduced into the acquisition and analysis of plant phenotypes in recent years. However, the existing deep learning algorithms cannot fully meet the high requirement of large-scale production, due to the less phenotypic traits and a high-cost CNN training. A convenient high-throughput approach is required to accurately obtain the phenotypic trait parameter of soybean seeds. In this research, an acquisition algorithm was proposed to extract the multiple-phenotypic trait parameters of soybean seeds using the OpenCV image processing library and computer vision. The image collection of soybean seeds was easily and rapidly completed using the mobile phone photography during the soybean seed test. All seeds of each soybean plant to be detected were also photographed as an image. Furthermore, the grayscale histogram of the original image was firstly established to automatically generate a binary graph. The morphological processing was then used to enhance the image details and remove the image noise. The improved watershed algorithm was used to extract the contours of soybean seeds in the image. The circularity was introduced to evaluate the seed contour. The secondary contour segmentation with a higher grayscale threshold was performed for the special seed adhesion in the small areas. The seed circularity was also introduced to identify the incomplete soybean seeds, according to the contour information. The proportion of abnormal RGB areas was calculated to determine the sick soybean seeds with the epidermis discoloration. The lengths of long and short axis, cross-section area, and circumference of soybean seed were calculated using the ellipse fitting and scale bar conversion. The CSV table files were used to store for all the phenotypic trait data of each soybean seed and the average phenotypic trait data of all soybean seeds in each image. The soybean plants were also sorted to optimize the soybean plant seeds with the excellent phenotype for the breeding experiment design. The acquisition algorithm was utilized to identify the soybean seeds, and then to extract the phenotype parameters of soybean seeds. The results show that the recognition rate of the total soybean seeds in each image reached 98.4%, the correct recognition rate of the damaged and diseased soybean seeds was 95.2%, as well as the calculation accuracies of the long and short axis length of soybean seed reached 96.8%, and 95.8%, respectively. The parallel computation of the algorithm was implemented to create the multiple processes. By introducing 8-process parallel calculation, the image processing time was reduced by two-thirds compared to single-process calculation. Thus, the proposed algorithm was easily parallelized to quickly realize the accurate acquisition of multiple phenotypic trait parameters of soybean seeds, including the circumference, area, long/short axis length, roundness, and RGB value. At the same time, an accurate identification was achieved in the good and damage soybean seeds, including the incomplete and the sick seeds.

       

    /

    返回文章
    返回