摘要
利用计算机视觉技术进行水果品质的在线检测与分选技术研究,对提高果品市场竞争力与产品增值效益具有重要应用前景。特别是在我国加入WTO世界贸易组织之后,这一需求显得更为迫切。本文就是在这样的背景下,研究了水果在线检测与品质分选的方法和技术,目的在于解决动态条件下,图象质量差,信息量大,实时处理能力低,检测精度低等问题。主要研究内容如下:
(1)在分析现有微分边缘检测算子的基础上,根据水果图象在检测时只需要检测目标外边缘的特点,提出了两种新的边缘检测算法:灰度邻域法和模板分析法。这两种方法检测的图象面积仅约传统方法的1/2,因此检测速度约是传统方法的2倍。由于在搜索过程中采用圆周上等角度方向进行,使检测出的边缘点有序。且边缘点清晰、连续,无需进一步细化和序列化处理,提高了系统处理速度。
(2)根据试验图象背景的均匀特性,提出了图象的快速定位和标记方法。对160×140大小的图象以10×10网点处理,仅需处理224个象素点后,就可以通过质点法计算出目标物体的参考形心和参考平均半径,有效地减少了后续处理的图象面积,提高了处理速度。
(3)对于运动造成的图象模糊问题,传统方法是根据运动成像模型分析得出的差分算法进行恢复。但是该方法计算量大、实时性差,且恢复过程属近似计算过程。本文在运动成像模型的基础上,结合图象的特点,以图象象素分析的方法进行恢复。试验结果表明恢复效果好,且处理速度快。
(4)对果径的检测提出了新的轴向检测算法和果径检测方法。克服了动态检测过程中传统方法很难确定果梗而造成果径检测的误差。该方法检测的方向与国标要求的方向一致,通过实际测量,计算机检测结果与人工检测结果有良好的相关性。本中提出的水果果形模型使形状的描述从定性提高到定量分析的水平,为果形分级提供了依据,使形状分级过程简化而且有效。
(5)提出以各色度域的分形维数为颜色特征值,取4个域的分形特征值作为输入模式,以人工神经网络进行颜色分级。由于这些特征值在考察各色度值累计特性的同时,考察了各色度的空间分布特性,因此,使颜色分级过程更符合实际情况。
(6)提出以待测图象的反射特性、平均半径为参数的标准球体灰度模型。以该模型的灰度值与待测图象作差进行缺陷分割,仅用单个阈值使不同灰度级的缺陷一次分割成功。该方法计算量小,操作速度快,同时不会在边缘产生接缝问题。
(7)提出了以水果空间结构特点识别缺陷与果梗花萼的方法。该方法取可疑缺陷区边缘上、下、左、右4个方向的灰度剖面线平均后作为特征剖面线,通过傅氏变换,再以低频项系数进行傅氏反变换重建,得剖面的总体形状,用该形状来识别缺陷。
(8)建立了以分级为目的的软硬件系统。硬件系统可完成水果的传输和动态捕获图象的功能。软件系统包括水果大小、形状、颜色以及缺陷的分级功能。
Study on the real time fruit quality detection by computer vision is an attractive and prospective R & D subject for improving marketing competition and post harvesting value-added processing technology of fruit products. As China entering WTO,it becomes more and more urgent. The objectives of this research are contributed to develop method and technology for fruit on line detection by computer vision. It aims at solving the problems,such as fast processing the large amount of image information,improving system performance for real time dynamic image capture and processing capability,increasing precision of detection and on line grading system establishment,etc. The results of study are briefly summarized as follows:
1. Based on analysis of current differential edge detection arithmetic operators and the requirement to detect only outer edge of objects in fruit detection,two new methods - gray adjacent area and template analysis were introduced for the solution. The image area detected with the new methods is only equal to half of traditional way,but the processing speed can be doubled. Because the search was carried out along equal angle on a circle,the edge point detected can be clear ordered and keeping continuity,so the farther thinning and serial processing were not needed and the processing speed of system was much improved.
2. Based on the uniformity of image background,a method of quick image orientation and marking was put forward. The 10 x 10 grids can be used to deal with the image of 160 x 140. Only after processing 224 pixels,the reference figure center and average radius of object can be calculated by particle method. It is very effective to reduce processing area and to improve processing speed.
3. With the problem of blurred image caused by object motion,traditional difference algorithm based on analyzing the model of moving image was generally adopted to recover the blurred images. But its calculation work is too much and the capability of real time processing is bad. The resume process actually is as approximate calculation. A new method in this paper was presented to resume the original image based on the pixel analysis. The method of motion imaging and combining with the characteristic of image could be resumed by pixels decomposing. The test showed good features and processing speed is quite fast.
4. In order to measure the size of fruit,a new way for the measurement of axis direction and width was presented in this paper. In the traditional way,the stem-end can not be ascertained,which would cause measurement error. The new method may overcome this disadvantage. The measurement direction of new method was consistent with national standards. By the measurement experiment,the results of computer detection has better than the human operation. The presented model of fruit shape can improve the shape description both in qualitative and quantitative analysis. The model is used as basis for shape classification. It may simplify the classification process and make the process more effective.
5. The fractal dimension of every hue area was considered as color feature value. The fractal feature
value of four hue area were used as input mode. The color was graded by artificial neural networks. Because of considering accumulative character and space distributing character of each hue at the same time,these feature values can make the color classification more close to reality.
6. A normal sphere hue model based on reflect character and average radius of image was introduced. It is used for fruit defects segmentation through comparison between the gray values of model and the detected object image. The defects were divided by the gray value of the image. Only one threshold is needed for a successful segmentation of the defects flaw of every gray level. In this method,less calculation is required and the processing speed is faster. There was no any juncture on edge.
7. A method based on the sphere frame character was used to identify the surface defects an
引文
1.汪懋华,精细农业的实践与农业科技创新.中国软件学,1999,4:21~25.
2.汪懋华,“精细农作” 技术发展与农业装备技术创新系列讲座,农业机械学报,1999(2-10)
3. Wang Maohua, Possible Adoption of Precision Agriculture for Developing Countries at the Threshold of the New Millennium, Computers and Electronics in Agriculture. 30(2001): 45-50,Elsevier, The Netherlands.
4. Pierre C. Robert, Precision Agriculture: An Information Revolution in Agricultural Management, 2001'ICAST Session 6: 125-131.
5.中国农业年鉴编辑委员会,中国农业年鉴,北京,中国农业出版社,1995.
6.中国农业年鉴编辑委员会,中国农业年鉴,北京,中国农业出版社,1996.
7.中国农业年鉴编辑委员会,中国农业年鉴,北京,中国农业出版社,1998.
8.中国农业年鉴编辑委员会,中国农业年鉴,北京,中国农业出版社,1999.
9.中国农业年鉴编辑委员会,中国农业年鉴,北京,中国农业出版社,2001.
10. Tadhg Brosnan, Da-Wen Sun, Computer Vision Applications in Agriculture, International Conference on Agriculture Science and Technology, 2001,Session 6-153-161
11. Tadhg Brosnan, Da-Wen Sun, Using Computer Vision Technology to Evaluate the Vase Life of Cut Flower, 2001'ICAST, Session 6:496-499.
12. Graf G,Rehkugler G. Automatic Detection of Surface flaws in Apples Using Digital Image Precessing. ASAE,1981. No.80-3537
13. Graf G,Rehkugler G.E,Gaultney L.D.Application of Machine Vision to Shape analysis in leaf and Plant Identification. ASAE,1993,36:163-171
14. Davenel A C, Guizard T, Labarre, Sevila. Automatic detection of surface defects on fruit by using a vision system. Journal of Agricultural Engineering Research, 1988,41(1) : 1-9.
15. Sarker N,Wolfe R.Computer Vision Based System for Quality Separation of Fresh Market Tomatoes. Transactions of ASAE,1985,28(5) :1714-1718
16. Sarker.N,Wolfe R. Computer Vision Based System for Quality Separation of Fresh Marker Tomatoes. ASAE, 1985,25(5) :1714-1718
17. Sarker.N,Wolfe R. Feature Extraction Techiques for Sorting Tomatoes by Computer Vision. ASAE 1985,28(3) :970-974
18. Marchant J A, Onyango C M, Street M J, High Speed Sorting of Potatoes Using Computer Vision, ASAE paper, 1988,No.3540
19. Yang Q S. The Potential for Applying Machine Vision to Defect Detection in Fruit and Vegetable Grading. Agriculture Engineering. 1992,47(3) : 74-79.
20. Yang Q S. Classification of Apples Surface Features Using Machine Vision And Neural Networks, Computer and Electronics in Agriculture, 1993b,(9) :1-12.
21. Yang Q S. Finding Stalk and Calyx of Apples Using Structured Lighting, Computer and Electronics in Agriculture, 1993a, (8) :31-34.
22. Yang Q S. An Approach to Surface Feature Detection by Machine Vision, Computers and Electronics in Agriculture.1994, (11) :249-264.
23. Yang Q S. Apple Stem and Calyx Identification with Machine Vision System. Journal of Agricultural Engineering Research, 1996,63(3) : 229-236.
24. Yang Q S, Marchant J A. Accurate Blemish Detection with Active Contour Models. Computers and Electronics in Agriculture. 1996, 14(1) : 77-89.
25. Rehkugler G. Throop J. Apple Sorting with Machine Vision, Transaction of the ASAE, 1986, 29 (5) : 1388-1397.
26. Rehkugler G, Throop J. Image Processing Algorithm for Apple Defect Detection. Transaction of the ASAE, 1989, 32(1) : 267-272.
27. Liao K, Paulsen M R, Reid J F. Real-time detection of colour and surface defects of maize kernels using machine vision. Journal of Agricultural Engineering Research, 1994,59: 263-271.
28. Tao Y. ,C.T.Morrow,P.Heinemann,H.J.Sommer,Fourier-Based Separation Technique For Shape Grading of Potatoes Using Machine Vision,1995,Transaction of ASAE,Vol.38(3) :949-957
29. Wen Z. And Tao Y. Dual-Camera NIR/MIR Imaging for Stem-End/Calyx Identificationn in Apple Defect Sorting. Transaction of ASAE, 2000,Vol.43(2) :446-452
30. Wen.Z.,and Tao Y. Adaptive Spherical Transform of Fruit Images for High-Speed Defect Recognition,1997,ASAE Paper No.973076
31. Tao Y.,P.Heinemann,Z.Verghese,C.T.Morrow, Machine Vision for Color Inspection of Potatoes and Apples,1995,Transaction of ASAE,Vol38(5) : 1555-1561
32. Tao Y..,B.Liu,L.Chance, On Line Vision Recognition System for Apple Defects and Stem-End/Calyx Distinction, ASAE paper No.96-3039
33. Tao Y.,and Wen Z. Adaptive Spherical Image Transform for High-Speed Fruit Defect Detection, 1999,Transaction of ASAE,Vol.42(1) :241-246
34. Tao Y. Closed-Loop Search Method for On Line Automatic Calibration of Multi-Camera Inspection Systems,1998,Transaction of American Society of Agricultural Engineers,Vol.41(5) :1549-1555.
35. Tao Yang, Spherical Transform of Fruit Images for On Line Defect Extraction of Mass Objects,1996,Society of Photo-Optical Instrumentation Engineers,Vol.35(2) :344-350
36. Tao Y. And J.Walker, Imaging and Pattern Recognition Method For Feather Sex Separation of Broiler Chicks.Transaction of ASAE,2000,Vol.43(2) :461-467
37. Throop J A. Apple damages segmentation utilizing reflectance spectra of the defect. ASAE Paper 1997,No. 973078.
38. Throop J A, Rehkugler G E, Upchurch B L. Application of Computer Vision for Detection Water-Core in Apples. Transaction of the ASAE. 1998, 32 (6) : 2087-2092.
39. Loren W Steenhoek, Iowa State Univ, Grimes, IA (LW Steenhoek, MK Misra, C Hurburgh, C Bern), Implementing a Computer Vision System for Com Kemel Damage Evaluation 1999 ASAE Annual International Meeting Technical Papers 2-993199
40. Liuqing Luo, Univ of Minnesota, St Paul, MN (L Luo, RR Ruan, P Chen, X Chen), Improved Modei for Scabby Wheat Estimation Using Machine Vision and Neural Networks. 1999 ASAE Annual International Meeting Technical Papers 2-993301
41. Toru Torii, Univ of Tokyo, Bunkyo-ku, Tokyo Japan (T Torii, T Teshima, T Okamoto, K Imou, K Taniwaki), Autonomous Navigation of Rice Husbandary Vehicle Using Machine Vision ,1999 ASAE Annual International Meeting Technical Papers 2-993005
42. Masahiko Suguri, Kyoto Univ, Kyoto, Kyoto Japan (M Suguri, M Umeda, E Morimoto), Path Finding Vision System for Japanese Rice Field 1999 ASAE Annual International Meeting Technical Papers 2-991042
43. Hiromichi Itoh, Kinki Univ, Naga-Gun, Japan (H Itoh), Plant Growth Diagnosis by Machine Vision Recognition of Days after Planting 1999 ASAE Annual International Meeting Technical Papers 2-995001
44. Brian L Steward, Univ of Illinois, Urbana, IL (BL Steward, LF Tian, L Tang), Detection of Outdoor Lighting Variability for Machine Vision-based Precision Agriculture 1999 ASAE Annual International Meeting Technical Papers 2-993032
45. Lie Tang, Univ of Illinois, Urbana, IL (L Tang, LF Tian, B1 Steward), Machine Vision Real-time Crop Row Detection, Weeds Species Identification and Size Estimation for Selective Herbicide Application 1999 ASAE Annual International Meeting Technical Papers 2-993036
46. Zacharia M Mgarilwa, Miyazaki Univ, Miyazaki, Japan (M Nagata, ZM Mgarihva, H Wang), Machine Vision Based Precision Seeding System for Plug Seedling Production 1999 ASAE Annual International Meeting Technical Papers 2-993141
47. Shachar Laykin, Ben-Gurion Univ of Negev, Beer Sheva, Israel (L Shachar, E Yael, A Victor), Development of a Quality Sorting Machine Using Machine Vision and Impact 1999 ASAE Annual International Meeting Technical Papers 2-993144
48. Pepito M Bato, Miyazaki Univ, Miyazaki Japan (PM Bato, M Nagata), Strawberry Sorting Using Machine Vision 1999 ASAE Annual International Meeting Technical Papers 2-993162
49. Loren W Steenhoek, Iowa State Univ, Grimes, IA (LW Steenhoek, MK Misra, C Hurburgh, C Bern), Implementing a Computer Vision System for Corn Kernel Damage Evaluation 1999 ASAE Annual International Meeting Technical Papers 2- 993199
50. Muhammad A Shahin, Canadian Grain Commission, Winnipeg, MB Canada (MA Shahin, S Symons), A Computer Vision System for Color Classification of Lentils 1999 ASAE Annual International Meeting Technical Papers 2- 993202
51. Howarth M.S,Searcy S. W, Kehtarnavaz N.Estimafion of tip shape for carrot classification by machine vision. Journal of Agricultural Engineering Research 1992,53:123-139
52. Alchanatic V, Peleg k,Ziv M.classification of tissue culture segments by color machine vision .Journal of Agriculturral Engineering Research, 1993,55:299-311
53. Marchant J A, Onyango C M, Street M J. High speed sorting of potatoes using computer vision. ASAE Paper,1988,No. 3540.
54. Miller B K, Delwiche M J. A color vision system for peach grading. Transaction of the ASAE, 1989, 32 (4):1484-1490.
55. Miller B K, Delwiche M J. Special analysis of peach surface defects. Transaction of the ASAE, 1991, 34 (6):2588-2597.
56. Miller B K, Delwiche M J. Peach defect detection with machine vision. Transaction of the ASAE, 1991, 34 (6):2509-2615.
57. Matrox Electronic Systems Ltd., MIL-Lite Version 6.0 User Guide and Command Reference, Manual No.10514-MU-0600, Feb. 24, 1999.
58. Matrox Electronic Systems Ltd., Matrox Meteor-Ⅱ Installation and Hardware Reference, Manual no.10577-101-0301, April 5, 2000.
59. Donald Hearn, M. Pauline Baker, Color Models and Color Applications, Computer Graphics C Version, Prentice - Hall International, Inc.
60. Yud-Ren Chen, Instnnnentation and Sensing Laboratory, Beltsville Agricultural Research Center, Future Trends of Machine Vision Technology For Agricultural Applications, International Conference for Engineering and Technologies Sciences 2000, Beijing, China.
61. Lei Tian, University of Illinois, 1304 W. Penn. Ave., Urbana, IL 61801, USA Sensor-Based Precision Herbicide Application System, International Conference for Engineering and Technologies Sciences 2000, Beijing, China.
62.孙济宇,张秀彬Windows下实时图像捕获的两种方法,微型电脑应用,2000(5):40-43
63.黄继武,Yun Q.Shi基于视觉特性的图象分割编码算法,中国图象图形学报,1999(5):400-404
64.欧阳黎,张永林,动态图象的连续采集和连续处理方法,中国图象图形学报,1999(6):458-462
65.季久峰,用事件转换法实现VxD与Win32程序的实时通信,微型电脑应用,2000(11):46-47
66.Kenneth.r.Castleman朱志刚,石定机等译,数字图像处理,电子工业出版社1998:176-213
67.中国科学院自动化研究所,CA-CPE-1000/3000彩色图像采集卡用户手册,1998:1-60
68.徐娟,水果分级中计算机视觉信息并行处理技术的研究,[博士学位论文],中国农业大学,1997.5:1-10.
69.何东健,计算机视觉果实分级技术的研究,[博士学位论文],西北农业大学,1998.6:1-6
70.王江枫,罗锡文,计算机视觉技术在芒果重量及果面坏损检测中的应用,北京,农业工程学报,1998-(4):186-189
71.北京大恒图像视觉公司,DH-VRT-CG210彩色/黑白图像采集卡使用说明
72.刘禾,计算机视觉在水果自动分级中的应用研究,[博士学位论文),北京,农业工程大学,1995-6,90-92
73.杨秀坤,陈晓光,马成林等,用遗传神经网络方法进行苹果颜色自动检测的研究,北京,农业工程学报,1997-(2):173-176
74.李士勇,模糊控制.神经控制和智能控制论,哈尔滨工业大学出版社,1998.74-104,111-125
75.刘亚洲,纪延超,Windows95下虚拟设备驱动程序的编制与应用,软件天地,1999(8):12-14
76.杜纲,创建Windows3.x/95驱动程序,软件天地,1999(3):17-15
77.中国标准出版社总编室,中国国家标准汇编,中国标准出版社1993A,GB10651-89:471-484
78.北京冶金机械研究院,光机电一体化新型果品处理生产线的研究可行性报告,2000.
79.宋韬,应用计算机视觉进行作物籽粒形态识别的研究.[博上学位论文],北京:北京农业工程大学,1995.
80.陈顺三,奶牛体形线性评定的图象处理技术研究.[博士学位论文],北京:北京农业工程大学,1996.
81.李庆中,苹果自动分级中计算机视觉信息快速获取与处理技术的研究,[博士学位论文],中国农业大学,2000.6
82.李庆中,汪懋华.墓于分形特征的水果缺陷快速识别方法,中国图象图形学报,2000年2期。
83.应义斌,景寒松等,黄花梨果形的机器视觉识别方法研究,北京,农业工程学报,1999-15(1):192-196
84.应义斌,景寒松,马俊福等,用计算机视觉进行果梗识别的新方法,北京,农业工程学报,1998,14(2):221-225
85.应义斌,景寒松,马俊福等,机器视觉技术在黄花梨尺寸和果面缺陷检测中的应用,北京,农业工程学报,1999,15(1):197-200
86.应义斌,饶秀勤等,机器视觉技术在农产品品质自动识别中的应用研究进展,北京,农业工程学报,1999,15(1):197-200
87.应义斌,章文英等,机器视觉技术在农产品收获和加工自动化中的应用,北京,农业机械学报,2000,31(3);112-115
88.冯斌,汪懋华,基于颜色分形的水果计算机视觉分级研究,农业工程学报,2002-18(2):141-144.
89.冯斌,汪懋华,计算机视觉系统中图象外边缘检测方法研究,中国农业大学学报,2002-(2)
90.冯斌,汪懋华,计算机视觉识别水果缺陷新方法研究,中国农业大学学报,2002-(4)
91.冯斌,汪懋华,基于计算机视觉的水果大小检测方法,农业机械学报,2002-(5)
92.冯斌,杨培岭,植物根系的分形及计算机模拟,中国农业大学学报,2000,5(2):96-99
93. Feng Bin, Wang Maohua, Zhang Senwen, Application of Fractal Image Simulation in Plant Root Growth,Proceedings of International Conference on Agricultural Engineering(99-ICAE), China Agricultural University Press, 1999. Part V: 6-9.
94.Jiang Guo, Feng Bin, Towards Semi-Automatically Extracting Object from Legacy Systems, 5th World Multi-conference on SYSTEMICS, CYBERNETICS AND INFORMATICS July 22-25, 2001 - Orlando, Florida,USA
95.杨培岭,冯斌,利用人工神经网络预报不同水分条件下作物根系发育参数,农业工程学报,2000-16(2):46-49
96.章毓晋,图象理解与计算机视觉,清华大学出版社,2000.10-[108-136]
97.阮秋琦,数学图象处理字,电子工业出版社,2001.7-[390-399]