该评
价函数描述了类间方差;最后依次搜索评价函数的一个最大值,自动获取
Canny
算子的高低阈值。该方法不需要
人为设定任何参数。
与传统
Canny
算法、
直接
Otsu
算法的结果比较表明,
本文方法对不同的图像都能较好地提取
真实边缘,特别是在低对比度图像的边缘提取上,此方法更具有优势。
关键词:
边缘检测;
Canny
算法;改进的
Otsu
算法;自适应阈值
中图分类号:
TP391.41
文献标志码:
A
doi:
10.3969/j.issn.1003-501X.2011.05.023
An Improved Algorithm for Canny Edge
Detection with Adaptive Threshold
TANG Lu-lu
1
,
ZHANG Qi-can
1
,
HU Song
2
( 1.
School of Electronic and Information Engineering
,
Sichuan University
,
Chengdu
610065,
China
;
2.
Institute of Optics and Electronics
,
Chinese Academy of Sciences
,
Chengdu
610209,
China
)
Abstract:
To overcome the difficulty of threshold selecting in Canny algorithm, an improved method based on Otsu
algorithm is proposed to choose the threshold adaptively and simultaneously. Firstly, guided by the gradient histogram of
the test image, all the pixels are divided into three classes. Secondly, based on the improved Otsu algorithm, an evaluation
function is defined to describe the mean square error among the three classes. Finally, both the high and low thresholds
are selected adaptively and independently by searching the maximum values of the evaluation function. Artificial
parameter setting is not necessary in this method. Compared with the results from traditional Canny method and Direct
Otsu method, the method shows great advantage in extracting the real edges from different images, especially low
contrast ones.
Key words:
edge detection; Canny algorithm; improved Otsu algorithm; adaptive threshold
0 引 言
随着当前数字化信息技术的发展,数字图像处理技术变得越来越重要,尤其在光电探测领域更是得到