一种基于Sobel算子的边缘检测算法

2020-11-13 03:38:57郑欢欢白鱼秀张雅琼
微型电脑应用 2020年10期

郑欢欢 白鱼秀 张雅琼

摘要: 针对传统Sobel边缘检测算法对噪声敏感、定位不够精确的缺点,提出了改进Sobel算子的边缘检测算法。算法基于均值计算和差分处理角度构造了5×5的梯度权值模板,通过改进的非极大抑制算法有效细化了边缘,采用局部自适应动态阈值提取边缘信息。通过实验表明,该算法不仅能够较快、较好的提取边缘信息,而且具有较强的抗噪能力。

关键词: Sobel算子; 边缘检测; 非极大值抑制; 局部自适应动态阈值

中图分类号: TN 911.73

文献标志码: A

An Edge Detection Algorithm Based on Sobel Operator

ZHENG Huanhuan, BAI Yuxiu, ZHANG Yaqiong

(School of Information Engineering, Yulin University, Yulin 719000, China)

Abstract: Aiming at the shortcomings of traditional Sobel edge detection algorithm such as noise sensitivity and inaccurate location, an improved Sobel operator edge detection algorithm is proposed. Based on mean calculation and difference processing, a 5×5 gradient weight template is constructed. The edge is refined effectively by improved nonmaximum suppression algorithm, and the edge information is extracted by local adaptive dynamic threshold. Experiments show that the algorithm not only can extract edge information quickly and better, but also has strong antinoise ability.

Key words: Sobel operator; edge detection; nonmaximum suppression; local adaptive dynamic threshold

0引言

圖像低级特征提取技术就是从整副图像而不是显著区域层次来描述图像,其中最重要的研究内容之一就是边缘检测。这一技术有助于人类从从图像中获得更多信息,从而进行智能控制处理。常用的一些经典边缘检测算子包括Roberts算子、Prewitt算子、Sobel算子、Log算子和Canny算子等。Sobel算子因其耗时短、具有一定的抗噪性、边缘检测效果较好而得到广泛应用。国内外的学者经过大量研究对基于该算子的算法提出了很多改进算法,如增加梯度模板方向[1]、修改梯度模板权值[2]、修改提取边缘的阈值[3]、综合其他方法的改进算法[4]等。本文在以前的研究基础上,从均值计算和差分处理角度构造5(5梯度模板,并通过边缘细化和自适应动态阈值处理,经实验检测的边缘更细,抗噪性更好。

1传统Sobel算法

Sobel算子是应用一阶微分等价算子检测图像梯度,从而确定边缘位置的边缘检测算法。通常用梯度

f来表示一幅图像f在(x,y)位置处的边缘强度和方向,其梯度的定义如式(1)。……

登录APP查看全文