APP下载

基于改进的Retinex算法的草坪杂草识别

2021-01-29化春键,张爱榕,陈莹

江苏农业学报 2021年6期

化春键,张爱榕,陈莹

摘要:针对草坪杂草图像前景与背景灰度相近导致图像前景难以识别的问题,本研究提出一种基于局部密度的Retinex增强算法。首先,为了突出图像前景,平滑杂乱背景,利用局部方差对图像进行预处理。其次,为了更准确地得到所需部分像素的空间信息,利用多阈值分割和开运算差分将像素分为前景、背景和待细分像素3类,利用局部密度提取待细分像素的空间信息。最后,为了融合局部密度信息,采用Sigmoid函数优化反射分量灰度变换系数,得到增强图像。结果表明,本研究算法增强效果良好,能有效扩大杂草与草坪草的灰度差,抑制背景噪声,峰值信噪比相对传统Retinex算法提高24.23%。

关键词:图像增强;局部方差;局部密度;Retinex算法;草坪杂草

中图分类号: TP391.41;S451.1文献标识码:A文章编号:1000-4440(2021)06-1417-08

Lawn weed recognition based on improved Retinex algorithm

HUA Chun-jian1,2,ZHANG Ai-rong1,2,CHEN Ying3

(1.School of Mechanical Engineering, Jiangnan University, Wuxi 214122, China;2.Jiangsu Key Laboratory of Advanced Food Manufacturing Equipment & Technology, Wuxi 214122, China;3.School of Internet of Things Engineering, Jiangnan University, Wuxi 214122, China)

Abstract:Aiming at the problem of indiscernible foreground of lawn weed images caused by the similarity of gray level between image background and image foreground, a Retinex enhancement algorithm based on local density was proposed. Firstly, to highlight the foreground and smooth the background clutter of the images, local variance was used to preprocess the images. Secondly, to obtain the spatial information of the required part of the pixels more accurately, the pixels were divided into three kinds, such as foreground pixels, background pixels and pixels to be subdivided by using multi threshold segmentation and open operation difference. The spatial information of the pixels to be subdivided was extracted by local density method. Finally, to incorporate the local density information, Sigmoid function was used to optimize the gray level transformation coefficient of reflection component to obtain the enhanced images. The results showed that, the proposed algorithm had good enhancement effect, which could expand the gray level difference effectively between weeds and lawn grasses, and could suppress background noise. The peak signal-to-noise ratio by this method was 24.23% higher compared with the traditional Retinex algorithm.

Key words:image enhancement;local variance;local density;Retinex algorithm;lawn weed

雜草会降低草坪的观赏性,大量生长的杂草与草坪草争抢养分、生长空间,会引起草坪早衰,缩短草坪生命周期。因此,草坪的杂草管理是草坪养护的重要环节[1]。传统的杂草管理分为人工除草和化学除草。人工除草效果良好,但是费时费力。化学除草经济高效,但大范围施药易引发草坪药害和环境污染[2]。采用基于机器视觉的杂草识别技术可以精确缩小除草剂的喷洒范围,实现精准施药。杂草图像识别的关键在于将杂草与草坪草分离。由于杂草与草坪草颜色相近,灰度差异较小,基于灰度[3]、形态[4]等特性的传统分割算法都不能很好地直接分割图像,因此需要对杂草图像进行增强,扩大前景与背景的灰度差异。……

登录APP查看全文