基于机器视觉的胡麻种子自动化考种方法OACSTPCD
Automated Flax Seeds Testing Methods Based on Machine Vision
[目的/意义]胡麻种子的周长、面积、长短轴和千粒重是胡麻考种过程中常用的参数,对于胡麻的育种、栽培,以及种子品质和性状的评估都具有重要的意义.[方法]针对胡麻种子自动化考种时出现的数据统计错误率高、效率低等问题,基于机器视觉研究胡麻种子的轮廓特点、探索形态特征的测量方法,针对籽粒重叠现象提出基于融合角点特征的轮廓拟合图像分割方法,设计胡麻种子自动化考种数据实时分析系统,最终实现胡麻种子自动化考种的研究.本研究在工业相机获取的胡麻种子图像上进行试验.[结果和讨论]提出的自动化考种方法对不同品种胡麻种子的统计识别准确率达97.28%,百粒种子平均处理时长69.58 ms,相较于极限腐蚀算法、基于距离变换的分水岭算法,平均计算准确率比极限腐蚀算法提升19.6%,平均运算时间低于直接使用分水岭算法所需时间.[结论]自动化考种方法具有更好的计算准确率和处理速度,能够更准确地批量获取胡麻种子的形态学特征参数,使测量误差能够保持在10%以内,可为今后胡麻考种相关工作提供技术支撑,助力相关产业发展.
[Objective]Flax,characterized by its short growth cycle and strong adaptability,is one of the major cash crops in northern China.Due to its versatile uses and unique quality,it holds a significant position in China's oil and fiber crops.The quality of flax seeds di-rectly affects the yield of the flax plant.Seed evaluation is a crucial step in the breeding process of flax.Common parameters used in the seed evaluation process of flax include circumference,area,length axis,and 1 000-seed weight.To ensure the high-quality produc-tion of flax crops,it is of great significance to understand the phenotypic characteristics of flax seeds,select different resources as parents based on breeding objectives,and adopt other methods for the breeding,cultivation,and evaluation of seed quality and traits of flax. [Methods]In response to the high error rates and low efficiency issues observed during the automated seed testing of flax seeds,the measurement methods were explored of flax seed contours based on machine vision research.The flax seed images were prepro-cessed,and the collected color images were converted to grayscale.A filtering and smoothing process was applied to obtain binary im-ages.To address the issues of flax seed overlap and adhesion,a contour fitting image segmentation method based on fused corner fea-tures was proposed.This method incorporated adaptive threshold selection during edge detection of the image contour.Only multi-seed target areas that met certain criteria were subjected to image segmentation processing,while single-seed areas bypassed this step and were directly summarized for seed testing data.After obtaining the multi-seed adhesion target areas,the flax seeds underwent con-tour approximation,corner extraction,and contour fitting.Based on the provided image contour information,the image contour shape was approximated to another contour shape with fewer vertices,and the original contour curve was simplified to a more regular and compact line segment or polygon,minimizing computational complexity.All line shape characteristics in the image were marked as much as possible.Since the pixel intensity variations in different directions of image corners were significant,the second derivative matrix based on pixel grayscale values was used to detect image corners.Based on the contour approximation algorithm,contour cor-ner detection was performed to obtain the coordinates of each corner.The resulting contour points and corners were used as outputs to further improve the accuracy and precision of subsequent contour fitting methods,resulting in a two-dimensional discrete point datas-et of the image contour.Using the contour point dataset as an input,the geometric moments of the image contour were calculated,and the optimal solution for the ellipse parameters was obtained through numerical optimization based on the least squares method and the geometric features of the ellipse shape.Ultimately,the optimal contour was fitted to the given image,achieving the segmentation and counting of flax seed images.Meanwhile,each pixel in the digital image was a uniform small square in size and shape,so the circum-ference,area,and major and minor axes of the flax seeds could be represented by the total number of pixels occupied by the seeds in the image.The weight of a single seed could be calculated by dividing the total weight of the seeds by the total number of seeds detect-ed by the contour,thereby obtaining the weight of the individual seed and converting it accordingly.Through the pixelization of the 1 yuan and 1 jiao coins from the fifth iteration of the 2019 Renminbi,a summary of the circumference,area,major axis,minor axis,and 1 000-seed weight of the flax seeds was achieved.Additionally,based on the aforementioned method,this study designed an automat-ed real-time analysis system for flax seed testing data,realizing the automation of flax seed testing research.Experiments were con-ducted on images of flax seeds captured by an industrial camera. [Results and Discussions]The proposed automated seed identification method achieved an accuracy rate of 97.28%for statistically distinguishing different varieties of flax seeds.The average processing time for 100 seeds was 69.58 ms.Compared to the extreme ero-sion algorithm and the watershed algorithm based on distance transformation,the proposed method improved the average calculation accuracy by 19.6%over the extreme erosion algorithm and required a shorter average computation time than the direct use of the wa-tershed algorithm.Considering the practical needs of automated seed identification,this method did not employ methods such as dila-tion or erosion for image morphology processing,thereby preserving the original features of the image to the greatest extent possible.Additionally,the flax seed automated seed identification data real-time analysis system could process image information in batches.By executing data summarization functions,it automatically generated corresponding data table folders,storing the corresponding im-age data summary tables. [Conclusions]The proposed method exhibits superior computational accuracy and processing speed,with shorter operation time and robustness.It is highly adaptable and able to accurately acquire the morphological feature parameters of flax seeds in bulk,en-suring measurement errors remain within 10%,which could provide technical support for future flax seed evaluation and related in-dustrial development.
毛永文;韩俊英;刘成忠
甘肃农业大学 信息科学技术学院,甘肃兰州 730000,中国
农业科学
胡麻种子机器视觉自动化考种图像分割软件系统
flax seedsmachine visionautomated seed testingimage segmentationsoftware systems
《智慧农业(中英文)》 2024 (001)
135-146 / 12
中国甘肃省高校创新基金项目(2021A-056);中国甘肃省高校产业扶持与引导项目(2021CYZC-57) Gansu Provincial University Innovation Fund Project in China(2021A-056);Gansu Provincial University Industry Support and Guidance Project in China(2021CYZC-57)
评论