APP下载

弱光复杂背景下基于MSER和HCA的树上绿色柑橘检测

2017-11-01胡秀文

农业工程学报 2017年19期
关键词:极值轮廓柑橘

卢 军,胡秀文



弱光复杂背景下基于MSER和HCA的树上绿色柑橘检测

卢 军1,胡秀文2

(1. 华中农业大学理学院,武汉 430070;2. 华中农业大学工学院,武汉 430070)

基于图像处理和机器视觉的树上绿色柑橘检测,能为果园管理者施肥、估产及采摘作业提供指导。该文提出一种基于水果表面光照分布的分层轮廓分析(hierarchical Contour Analysis,HCA)算法实现了树上绿色柑橘的检测。彩色数码相机拍摄弱光下由闪光灯补光的树上柑橘场景彩色图像,基于水果表面的光照分布应用最大稳定极值区域(maximally stable extremal region,MSER)算法提取图像中的感兴趣区域,然后建立感兴趣区域周围的分层轮廓图,并利用霍夫变换拟合每一级轮廓获得分层圆形目标,最后进行拟合圆嵌套分析得到绿色柑橘水果目标。所提算法在20张复杂的柑橘果园场景图像中进行了测试,最终的召回率达81.2%,查准率达到83.5%,单幅图像平均处理时间为3.70 s。该文所提出的基于光照分布的分层轮廓分析算法,不仅适用于绿色柑橘的检测,也可为其他树上绿色水果检测提供通用的框架和思路。

图像处理;目标识别;算法;最大稳定极值区域;分层轮廓分析;霍夫变换;绿色柑橘检测

0 引 言

在水果生产过程中,充分利用信息化、智能化技术对作物生长进行动态监测,对于果园的自动管理(自动施肥/灌溉/喷药)、提高农作物品质、产量估计及自动采摘都有着重要意义。本文以柑橘为例,讨论了基于图像处理的树上绿色水果检测。树上绿色水果的检测与识别是实现水果生产自动化和智能化的一个关键环节,对优化果园管理、实现自动作业具有重要的价值和应用前景。

随着图像处理、机器视觉技术的发展,关于树上水果检测和识别已吸引了众多在图像处理和农业工程领域研究者的目光。Jimenez等[1-3]撰写了关于树上水果检测定位的综述性文章,全面地展示了该领域当时的发展阶段和存在的挑战,描述了为解决挑战所采用的各种成像设备和图像处理方法。其中大部分工作是研究与背景颜色差异较大,如红色、橙色水果的检测,而关于树上绿色水果的检测与识别的工作较少且起步较晚。自2004年开始,陆续有关于树上绿色水果检测的论文发表。Annamalai等[4]在实验室利用光谱仪对比了绿色柑橘和绿色叶片的光谱,提出基于光谱波段比的绿色柑橘检测方法。Safren等[5]研究了基于可见光和近红外高光谱图像的绿色苹果产量估计系统。Okamoto等[6]实现了基于高光谱相机和波段比算法的绿色柑橘检测,对于完整柑橘检测的成功率在82%以上,但对于遮挡柑橘检测的成功率在47%~59%之间。Stajnko等[7]利用热像仪来估计未成熟苹果的数量和直径,Wachs等[8]提出利用彩色图像和热图像来检测绿色苹果的方案,但利用热图像的方法仅能在阳光直射的下午使用。而利用彩色相机获取的彩色图像进行树上绿色水果检测,由于设备价格低廉、使用方便而被普遍采用。更多的工作集中在分析处理彩色图像,并利用颜色、纹理、形状或多个特征组合来实现对树上绿色水果的检测[9-13]。

利用彩色图像进行树上绿色水果检测的方法,对于多变的自然光照条件非常敏感,检测的效果不够稳定鲁棒[14-15]。针对该方法易受自然光照条件影响的问题,Payne等[16-19]利用人造光源对夜间的树冠进行照明,从而获得人造光照条件下的夜间彩色图像并实现了较鲁棒的树上水果检测。Linker等[20]提出了利用水果表面形状的凸性所产生的光照分布特征来检测树上苹果。Linker等[18]指出,在弱光条件下利用人工光源照明时,由于水果表面的镜面反射效果,在光源正入射方向会形成一个亮斑,在该亮斑附近由于水果的球形特征会形成具有环状对称性特征的光强分布。Linker[19]提出了利用多个阈值来分割夜间树上绿色苹果图像,然后针对分割结果图进行圆拟合,并利用在多个分割图中拟合圆的累计得分来检测树上绿色柑橘的方法。该方法效果较好而且比较稳定,但处理过程中共需要设置7个参数,而且在多个分割图像中进行圆霍夫变换来检测圆目标,这是一件极为耗时的工作,其时间性能没有报道。

针对当前利用水果表面光照分布检测树上水果等工作的亮点和不足,本文提出基于最大稳定极值区域和分层轮廓分析算法的树上绿色柑橘检测算法。本项工作利用彩色摄像机获取在弱光条件下由闪光灯补光的树上绿色柑橘图像,利用最大稳定极值区域检测场景中的感兴趣目标区域。针对符合形状条件的感兴趣局部区域,本文首次提出局部分层轮廓分析算法,捕捉并检测柑橘目标表面的环形光照对称分布,从而最终检测出树上绿色柑橘目标。

1 试验系统与图像采集

本文图像的采集时间为2016年8月—10月18:00—19:30,试验对象为树上绿色柑橘,柑橘品种为Hamlin,地点为美国弗洛里达大学柑橘果园。所使用的相机为佳能公司生产的微型单反相机EOS M,镜头为佳能公司生产的EF-M卡口18~55 mm镜头(拍摄时使用18 mm广角端),配备一个闪光灯(Canon 430EX)。闪光灯直接安装在相机机顶的热靴中与镜头对齐。试验拍摄同一果园中20棵不同果树的单侧图像,所拍摄图像的原始分辨率为5 184´3 456像素,存储为24位彩色JPG图像。图像处理时将所有图像均调整成1 037´691像素的大小以便后期处理,图像处理的软件是Matlab R2015b,所使用的计算机CPU为Intel Core i5 4258U 2.40 GHz,内存为4 GB,操作系统为 Microsoft Windows 8.1中文版。

2 试验方案设计

本文所提算法分为两个阶段:感兴趣区域提取及分层轮廓分析。第一阶段首先提取彩色图像的绿色分量进行预处理,然后运用最大稳定极值区域(maximally stable extremal region,MSER)算法[21-23]提取灰度图像中的感兴趣区域,通过对检测出的感兴趣区域进行形状分析初步筛选出水果目标区域。第二阶段提出分层轮廓分析算法(hierarchical contour analysis,HCA),针对筛选后的感兴趣区域提取目标的分层轮廓线,利用圆形霍夫变换拟合出目标圆并依据圆心距离进行嵌套分析得到最终的柑橘水果目标。算法的主要流程图如图1所示。

图1 绿色柑橘检测算法流程图

2.1 图像预处理

由于检测的是树上绿色水果目标,本文首先提取彩色图像中的绿色分量灰度图,然后对绿色分量图进行滤波以滤除部分噪声。在本试验的测试过程中发现,对比维纳滤波[24],中值滤波会使目标的误检测增加。而在使用维纳滤波的过程中,3´3的滤波窗口比5´5及更大的滤波窗口更有利于检测面积较小及遮挡严重的水果目标。因此本文最终采用3´3的滤波窗口进行维纳滤波滤除图像中的高斯噪声。经过维纳滤波平滑的图像,能够在水果表面提供更好的光照环形对称性分布,有助于利用该特征实现对绿色柑橘的检测。

2.2 MSER算法检测感兴趣区域

MSER算法最初是Matas等[25]在检测局部仿射不变特征区域时基于分水岭变换的方法提出的,主要用于处理灰度图像[26-28]。其基本思想是:对于一幅灰度图像,利用递变的阈值对图像进行二值化分割,阈值取0~255共256个数值,由此得到256幅二值图像。在阈值由0不断增大或由255不断减小的过程中,有一些连通区域在较大范围阈值内形状保持稳定,这些区域即为最大稳定极值区域MSERs。

针对预处理平滑后的灰度图像,利用MSER算法提取其最大稳定极值区域,图2给出了一个检测的示例。图2a为原始彩色图像,图2b为MSER算法对相应灰度图像中最大稳定极值区域的提取,图中的柑橘目标有明显区别于背景的轮廓,且在柑橘目标中心入射点附近呈现出近似于同心圆环的光强分布特征。在MSER算法提取结果的基础上,针对每一个最大稳定极值区域轮廓进行椭圆目标拟合[29-32],得到如图2c的结果。由椭圆拟合结果可见,算法提取出的目标较多,且其中大部分为背景。因此,需要对提取区域结果进行形状分析,初步筛选出具有合适形状特征的最大稳定极值区域。

a. 原始图像 a. Original imageb. 最大稳定极值区域(MSER)b. Maximally stable extremal regions (MSER) c. 椭圆拟合结果 c. Fitting results of ellipsed. 筛选结果 d. Screening results

假设利用MSER算法提取出了个最大稳定极值区域,其中第个极值区域拟合出来的椭圆目标E参数为

式中(x,y)为中心坐标,ab分别为长轴与短轴长度,θ为椭圆长轴倾角。根据该椭圆离心率e去除无效椭圆

式中4为离心率阈值,该式指出有效椭圆的离心率必须足够小。在获取的图像集中利用柑橘目标外轮廓的内接矩形手动标记了100个柑橘水果目标,分析了这100个水果目标的离心率,发现其离心率均低于0.35,因此此处的阈值4取值为0.35。然后对图2c的目标区域进行形状分析,最终得到的有效区域如图2d所示。

2.3 基于分层轮廓分析的目标检测(HCA)

MSER算法提取出的感兴趣区域数量较多,经过椭圆拟合和形状分析之后,保留了形状接近于圆形的最大稳定极值区域,而这些区域中仅有一部分是水果目标。本文首次提出一种分层轮廓分析算法(hierarchical contour analysis,HCA)用以检测有效感兴趣区域中的水果目标。

本试验中,由于柑橘果实近似球形,在光线正入射的表面处会出现一个亮斑。在该亮斑中心附近,柑橘表面的光强呈现出环形对称分布的特征。针对这种光强环形对称分布特征,本文提出分层轮廓分析方法来检测水果表面这种特有的光照分布模式(图3)。

注:LM、LM-1、LM-2分别为第M、M-1、M-2级分层轮廓(上行)及对应拟合圆目标(下行)。

在2.2节所检测出的每一个最大稳定极值区域基础上,图3a为图2d所对应的亮度等高线分布图,选取图像中蓝色框标记的水果作为目标进行进一步分析。图3b是该目标的亮度等高线放大图,最中间的轮廓线定义为L,由中心向外层依次选取3级轮廓线,分别为LL1、L2。针对这三级等高线的外轮廓,分别利用圆形霍夫变换[33-37]进行圆检测,结果如图3c~3e所示。每个水果目标的每级轮廓线拟合出一个圆,由此拟合出多个近似同心圆,即为水果目标的分层轮廓特征,如图3f所示。最终,依据式(3)对多级轮廓线进行嵌套分析得到最终的目标圆。

其中RR分别表示圆C与圆的半径,d表示两个圆心的距离。当两个圆的圆心距离足够近时,则认为圆属于圆的一部分,因此只保留圆。最终保留下来的最后一个圆目标唯一对应一个水果,如图3g所示。

3 检测结果与分析

为验证本文所提算法的有效性,对20幅复杂的树上绿色柑橘图像进行处理,结果表明该算法能够有效识别图像中的绿色柑橘目标。图4a与图4b为其中2张图像处理的结果(依次对应表1中前两组数据)。由图4可见,本文算法识别出了图像中大部分的绿色柑橘目标。

a. 图像1检测结果 a. Detection results of image 1

b. 图像2检测结果 b. Detection results of image 2

注:蓝色矩形框为人工标记的柑橘;红色小圆为最大稳定极值区域中心点;较大的红色圆为算法检测到的绿色柑橘。

Note: The blue rectangles are artificial markers of citrus; The small red circles are the center points of MSER; The larger red circles are the green citrus fruits that the algorithm detected.

图4 示例图像及检测结果

Fig.4 Example images and test results

表1是本文所提算法在20幅测试图像上的检测结果。其中,真正类tp表示每张图中正确识别的水果目标个数,假正类fp表示背景被错误识别成水果的目标个数,假负类fn表示图中未被正确检出的水果目标个数。ac表示召回率,%;pc表示查准率,%。

其中ac与pc的计算公式如式(4)所示。

在以上20幅图构成的测试图像集中,共检测出了496个水果目标,漏检测115个目标,误检测98个目标。在整个测试集上的总计召回率为81.2%,查准率为83.5%。

表1 本文算法对20幅柑橘图像检测结果

4 讨 论

Linker等[20]提出了利用水果表面形状的凸性所产生的光照分布特征实现树上苹果检测,其所提算法的召回率为93.5%,查准率为86.0%。但该算法首先要提取水果目标的外轮廓,因此极易受到光照变化和遮挡的影响;而本文提出的分层轮廓分析,利用的是环形光照的多级轮廓特征,不需要提取水果目标的外轮廓,当柑橘表面被部分遮挡时,其外层轮廓线不再完整但内层轮廓线仍旧完整,保证了该算法在光照变化和遮挡下的稳定性。

Li等[13]采用了模板匹配和圆霍夫变换的方法提取感兴趣区域,然后利用纹理特征去除假正区域,最终在59张图共154个目标果的测试集上达到了84.4%的识别率。Zhao等[38]整合了基于色差分析和模板匹配的方法提取感兴趣区域,然后利用纹理特征和支持向量机对感兴趣区域进行了分类得到最终水果目标,最终在68张图共308个目标果的测试集上达到了83.4%的识别率。

表2为上述几种最新的方法与本文的结果对比,由表2可见,本文算法在召回率和查准率方面要略低于这几篇文章的结果。Linker等[20]和Li等[13]所使用的测试集中的平均每幅图像仅包含2个左右水果目标, Zhao等[38]所处理的图像包含目标平均在4.5个/幅,而本文所使用的测试集中的每幅图像平均包含30.6个目标。随着每张图中包含的目标数量大幅增加,遮挡和水果尺度变化显著增加,因此目标检测的复杂度和难度相应地也会大幅增加。

表2 不同方法检测结果对比

水果目标漏检测的主要原因估计来自两个方面:1)如图4a中大部分漏检测的水果所示,水果本身像素太小或遮挡率超过60%甚至更高;2)光照不够均匀及阴影的存在,使部分水果表面未形成环形对称分布特征。由于树冠场景复杂,导致树冠场景图像中存在极亮或极暗区域,这些区域内的叶片由于对比度偏低,易被误检测为柑橘,如图4b右侧。另一方面,一些正对相机的叶片表面易形成一种近似环形分布的特征,往往会被误检测为柑橘目标。

为了进一步了解本文所提算法的时间性能,将本文所提算法分为两个阶段:最大稳定极值区域提取(MSER)及分层轮廓分析(HCA),如图1所示。经在测试集上的所有图像测试,平均每幅图像在第一阶段的处理时间为0.57 s,第二阶段的处理时间为3.13 s,每幅图像的平均处理时长合计为3.70 s。两个阶段相比较而言,利用HCA方法提取轮廓所花时间较长,主要是由于霍夫变换拟合圆形目标需要较长时间。下一步的工作拟采用其他圆拟合的方法替换霍夫变换,从而减少HCA算法的执行时间。

5 结 论

本文提出了一种基于最大稳定极值区域(maximally stable extremal region,MSER)和分层轮廓分析(hierarchical contour analysis,HCA)的树上绿色柑橘检测算法。该算法首先提取彩色图像的绿色分量,进行维纳滤波后,采用MSER算法提取图像中的最大稳定极值区域,通过形状分析筛选感兴趣的最大稳定极值区域。然后使用HCA算法提取感兴趣区域的轮廓信息,对提取出的每级轮廓采用霍夫变换进行圆拟合,对分层拟合圆目标进行嵌套分析从而得到最终检测目标。本文所提算法利用了水果表面环形光照分布的轮廓形状特征实现了树上绿色水果检测,该方法所使用的形状特征比颜色特征更为稳定,同时也避免了常见水果外轮廓形状特征在阴影和遮挡下的不稳定性。通过在20幅图像构成的图像集合上进行测试,本文所提算法的最终召回率达81.2%,查准率为83.5%,每幅图像的平均处理时间为3.70 s。试验表明,本文所提算法能够有效识别复杂果园场景中的绿色柑橘水果目标。在下一步的工作中,一方面需要优化圆拟合阶段从而提高时间性能;另一方面要验证该算法在不同水果品种、不同时间和光照条件下的性能,以推广该算法。

[1] Jimenez A R, Ceres R, Pons J L. A survey of computer vision methods for locating fruit on trees[J]. Transactions of the ASAE, 2000, 43(6): 1911-1920.

[2] Kapach K, Barnea E, Mairon R, et al. Computer vision for fruit harvesting robots–state of the art and challenges ahead[J]. International Journal of Computational Vision and Robotics, 2012, 3(1): 4-34.

[3] Gongal A,Amatya S,Karkee M,et al. Sensors and systems for fruit detection and localization: A review[J]. Computers and Electronics in Agriculture,2015,116:8-19.

[4] Annamalai P, Lee W S. Identification of green citrus fruits using spectral characteristics[C]//ASABE Paper No. FL04–1001. St. Joseph, Mich: ASABE, 2004.

[5] Safren O,Alchanatis V, Ostrovsky V,et al. Detection of green apples in hyperspectral images of apple–tree foliage using machine vision[J]. Transactions of the ASABE, 2007, 50(6): 2303-2313.

[6] Okamoto H,Lee W S. Green citrus detection using hyperspectral imaging[J]. Computers and Electronics in Agriculture, 2009,66(2): 201-208.

[7] Stajnko D, Lakota M,Hočevar M. Estimation of number and diameter of apple fruits in an orchard during the growing season by thermal imaging[J]. Computers and Electronics in Agriculture, 2004, 42(1): 31-42.

[8] Wachs J P, Stern H I, Burks T, et al. Low and high–level visual feature–based apple detection from multi–modal images[J]. Precision Agriculture, 2010, 11(6): 717-735.

[9] Rakun J, Stajnko D, Zazula D. Detecting fruits in natural scenes by using spatial-frequency based texture analysis and multiview geometry[J]. Computers and Electronics in Agriculture, 2011, 76(1): 80-88.

[10] Aggelopoulou A D, Bochtis D,Fountas S, et al. Yield prediction in apple orchards based on image processing[J]. Precision Agriculture, 2011, 12(3): 448-456.

[11] Kurtulmus F, Lee W S, Vardar A. Green citrus detection using ‘eigenfruit’, color and circular Gabor texture features under natural outdoor conditions[J]. Computers and Electronics in Agriculture, 2011, 78(2): 140-149.

[12] Chaivivatrakul S, Dailey M N. Texture–based fruit detection[J]. Precision Agriculture, 2014, 15(6): 662-683.

[13] Li H, Lee W S, Wang K. Immature green citrus fruit detection and counting based on fast normalized cross correlation (FNCC) using natural outdoor colour images[J]. Precision Agriculture, 2016, 17(6): 678-697.

[14] Linker R, Cohen O, Naor A. Determination of the number of green apples in RGB images recorded in orchards[J]. Computers and Electronics in Agriculture, 2012, 81: 45-57.

[15] Payne A B, Walsh K B, Subedi P P, et al. Estimation of mango crop yield using image analysis–segmentation method[J]. Computers and Electronics in Agriculture, 2013, 91: 57-64.

[16] Payne A, Walsh K, Subedi P, et al. Estimating mango crop yield using image analysis using fruit at ‘stone hardening’ stage and night time imaging[J]. Computers and Electronics in Agriculture, 2014, 100: 160-167.

[17] Font D, Tresanchez M, Martínez D, et al. Vineyard yield estimation based on the analysis of high resolution images obtained with artificial illumination at night[J]. Sensors, 2015, 15(4): 8284-8301.

[18] Linker R, Kelman E, Cohen O. Estimation of apple orchard yield using night time imaging[M]. Netherlands: Wageningen Academic Publishers, 2015: 568-580.

[19] Linker R. A procedure for estimating the number of green mature apples in night-time orchard images using light distribution and its application to yield estimation[J]. Precision Agriculture, 2017, 18(1): 59-75.

[20] Linker R,Kelman E. Apple detection in nighttime tree images using the geometry of light patches around highlights[J]. Computers and Electronics in Agriculture, 2015, 114: 154-162.

[21] 廉蔺,李国辉,王海涛,等. 基于MSER的红外与可见光图像关联特征提取算法[J]. 电子与信息学报,2011,33(7):1625-1631. Lian Lin, Li Guohui, Wang Haitao, et al. Corresponding feature extraction algorithm between infrared and visible images using MSER[J]. Journal of Electronics & Information Technology, 2011, 33(7): 1625-1631. (in Chinese with English abstract)

[22] Mikolajczyk K, Tuytelaars T, Schmid C, et al. A comparison of affine region detectors[J]. International Journal of Computer Vision, 2005, 65(1): 43-72.

[23] Fraundorfer F, Bischof H. A novel performance evaluation method of local detectors on non-planar scenes[C]//Computer Vision and Pattern Recognition– Workshops. CVPR Workshops. IEEE Computer Society Conference on. IEEE, 2005: 33.

[24] Grover R, Hwang P Y C. Introduction to random signals and applied Kalman filtering[M]. New York: Willey, 2012.

[25] Matas J, Chum O, Urban M, et al. Robust wide-baseline stereo from maximally stable extremal regions[J]. Image Vision Computing, 2004, 22(10): 761-767.

[26] Mikolajczyk K,Schmid C. A performance evaluation of local descriptors[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2005, 27(10): 1615-1630.

[27] Nistér D, Stewénius H. Linear time maximally stable extremal regions[C]// Computer Vision - ECCV 2008, European Conference on Computer Vision, Marseille, France, 2008:183—196.

[28] Obdržálek D, Basovník S, Mach L, et al. Detecting scene elements using maximally stable colour regions[C]// International Conference on Research and Education in Robotics. Springer Berlin Heidelberg, 2009: 107-115.

[29] 王志彬,王开义,张水发,等. 基于K-means聚类和椭圆拟合方法的白粉虱计数算法[J]. 农业工程学报,2014,30(1):105-112. Wang Zhibin,Wang Kaiyi,Zhang Shuifa,et al. Whiteflies counting with K-means clustering and ellipse fitting[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2014, 30(1): 105-112. (in Chinese with English abstract)

[30] 贺磊盈,蔡丽苑,武传宇. 基于机器视觉的幼苗自动嫁接参数提取[J]. 农业工程学报,2013,29(24):190-195. He Leiying, Cai Liyuan, Wu Chuanyu. Vision-based parameters extraction of seedlings for grafting robot[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2013, 29(24): 190-195. (in Chinese with English abstract)

[31] 卢军,桑农. 变化光照下树上柑橘目标检测与遮挡轮廓恢复技术[J]. 农业机械学报,2014,45(4):76-81. Lu Jun, Sang Nong. Detection of citrus fruits within tree canopy and recovery of occlusion contour in variable illumination[J]. Transactions of the Chinese Society for Agricultural Machinery, 2014, 45(4): 76-81. (in Chinese with English abstract)

[32] 陈基伟. 椭圆直接拟合算法研究[J]. 工程勘察,2007(6):49-51. Chen Jiwei. Study on direct fitting algorithm of ellipse[J]. Geotechnical Investigation & Surveying,2007(6): 49-51. (in Chinese with English abstract)

[33] Pothen Z S, Nuske S. Texture-based fruit detection via images using the smooth patterns on the fruit[C]//IEEE International Conference on Robotics and Automation. IEEE, 2016: 5171-5176.

[34] Duda R O. Use of the Hough transform to detect lines and curves in pictures[J]. Commun ACM, 1972, 15: 11.

[35] 李寒,张漫,高宇,等. 温室绿熟番茄机器视觉检测方法[J].农业工程学报,2017,33(增刊1):328-334.

Li Han, Zhang Man, Gao Yu, et al. Green ripe tomato detection method based on machine vision in greenhouse[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE),2017, 33(Supp.1):

328-334. (in Chinese with English abstract)

[36] 陶丹,王峥荣,李光林,等. 基于解模糊算法的蚕蛹图像恢复及雌雄识别[J]. 农业工程学报,2016,32(16):168-174.Tao Dan, Wang Zhengrong, Li Guanglin, et al. Silkworm pupa image restoration based on aliasing resolving algorithm and identifying male and female[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2016, 32(16): 168-174. (in Chinese with English abstract)

[37] 李昕,李立君,高自成,等. 改进类圆随机Hough变换及其在油茶果实遮挡识别中的应用[J]. 农业工程学报,2013,29(1):164-170. Li Xin, Li Lijun, Gao Zicheng, et al. Revised quasi-circular randomized Hough transform and its application in camellia- fruit recognition[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2013, 29(1): 164-170. (in Chinese with English abstract)

[38] Zhao C, Lee W S, He D. Immature green citrus detection based on colour feature and sum of absolute transformed difference (SATD) using colour images in the citrus grove[J]. Computers and Electronics in Agriculture, 2016, 124: 243-253.

卢 军,胡秀文. 弱光复杂背景下基于MSER和HCA的树上绿色柑橘检测[J]. 农业工程学报,2017,33(19):196-201. doi:10.11975/j.issn.1002-6819.2017.19.025 http://www.tcsae.org

Lu Jun, Hu Xiuwen. Detecting green citrus fruit on trees in low light and complex background based on MSER and HCA [J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(19): 196-201. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2017.19.025 http://www.tcsae.org

Detecting green citrus fruit on trees in low light and complex background based on MSER and HCA

Lu Jun1, Hu Xiuwen2

(1.430070,; 2.430070,)

Accurate crop-load estimation is very important for efficient management of nutrients and harvest operations. Current machine vision techniques for crop-load estimation have achieved only limited success mostly due to partial occlusion, shape irregularity, varying illumination and multiple sizes. Detecting immature green fruit is a more challenging task for similar color of fruit and background. The key starting point of this paper for detecting immature citrus fruit was the observation that the light distribution on citrus fruit follows a general pattern in which the light intensity decreases with the distance from a local maximum due to specular reflection. Immature citrus fruit detection was achieved by detecting this pattern with concentric circles or parts of circles. This pattern was proposed with the maximally stable extremal region (MSER) method and validated by hierarchical contour analysis (HCA) which was the first proposed in this paper. The images were captured by a color camera under low natural light conditions with a flashlight, and the green component of the color images was used for further analysis. After smoothing the whole image by Weiner filter, the regions of interest (ROIs) in the image were extracted by the method of MSER. The ROIs detected by MSER were those whose support was nearly the same over a range of thresholds, so the regions on citrus fruit were detected by MSER for the pattern that the light intensity decreases stably and gently with the distance from a local maximum. However, many regions on leaves and background were also detected as ROIs and should be excluded in the next step. A novel algorithmic technique was proposed to remove these regions on background, and this method was named as the HCA. Firstly, shape analysis was used for each ROI and only those ROIs were considered as valid if the shape was nearly circular. Secondly, multiple levels of contours around each valid ROI were extracted and fitted with the circular Hough transform (CHT). Lastly, multiple fitted circles would be merged into one if their most parts were overlapped together, this step was called circle merging and the merged circles were considered as the last detected citrus fruits. The algorithm was tested on a testing dataset with 20 images and achieved the recall rate of 81.2% and the precision rate of 83.5%. The processing time of the proposed method was 3.70 s totally on each image, on average, in which 0.57 s was used for MSER detection and 3.13 s was used for HCA. The result showed that the proposed method can detect green citrus fruit in a very difficult and challenging scene with so many fruits in one image and extensive partial occlusion. The good performance of partial occlusion tolerance of the proposed method in this paper is mainly due to that the proposed HCA doesn’t use the shape of outer contour of fruit, but uses multiple concentric contours which come from the pattern of light intensity distribution on fruit surface. The research framework in this paper can give a novel thought on other green fruit detection besides citrus fruit.

image processing; object recognition; algorithms; hierarchical contour analysis (HCA); maximally stable extremal region (MSER); circular hough transform; immature citrus detection

10.11975/j.issn.1002-6819.2017.19.025

TP391. 41

A

1002-6819(2017)-19-0196-06

2017-06-09

2017-09-19

国家自然科学基金资助项目(34113029)

卢 军,湖北宜昌人,副教授,博士生,主要从事图像处理与机器视觉方面的研究。Email:lujun5918@163.com

猜你喜欢

极值轮廓柑橘
极值点带你去“漂移”
极值点偏移拦路,三法可取
OPENCV轮廓识别研究与实践
极值点偏移问题的解法
基于实时轮廓误差估算的数控系统轮廓控制
一类“极值点偏移”问题的解法与反思
高速公路主动发光轮廓标应用方案设计探讨
丹江口柑橘价格“破纪录”啦
“五及时”柑橘冻害恢复技术
2016年春黄岩区柑橘冻害调查