APP下载

一种改进的一维Otsu快速算法

2017-10-17郭瑞峰杨柳彭光宇袁超峰

现代电子技术 2017年20期

郭瑞峰+杨柳+彭光宇+袁超峰

摘 要: 阈值分割是众多图像分割方法中使用最普遍的一种方法,阈值的求解也是图像处理的重心。传统Otsu算法属于穷举式的阈值求解方法,需遍历每个灰度值并计算以其为阈值的类间方差,在此进行了大量不必要的计算,可能无法应用于某些实时性要求较高的环境中。对此提出一种快速的Otsu改进算法,在引入图像复杂度及其相关性质缩小了灰度的搜索范围,同时在搜索范围内使用了一种快速计算方法,较传统Otsu算法进行了二次加速。实验结果证明,该算法较传统Otsu算法提高了计算速度,且两种算法的图像分割结果相同。

关键词: 图像分割; 图像复杂度; Otsu算法; 快速计算

中图分类号: TN911.73?34; TP391.41 文献标识码: A 文章编号: 1004?373X(2017)20?0042?04

Abstract: Threshold segmentation is one of the most commonly used image segmentation methods, and the solution of threshold is also the focus of image processing. The traditional Otsu algorithm is an exhaustive threshold solution method, which needs to traverse each gray value, calculate the interclass variance taking the gray value as the threshold value, and make a large number of unnecessary calculations. As a result, the traditional Otsu algorithm may not be appropriate to be applied in some environments with high real?time performance requirements. Therefore, an improved fast Otsu algorithm is proposed. The hunting scope of the traversed gray was reduced after importing the image complexity and its related properties. A fast calculation method is used in the scope of the traversed gray, which executes secondary acceleration in comparison with the traditional Otsu algorithm. The experimental results show that this algorithm improves the calculation speed in comparison with the traditional Otsu algorithm, and the image segmentation results of the two algorithms are the same.

Keywords: image segmentation; image complexity; Otsu algorithm; fast calculation

0 引 言

图像分割是图像分析中的难点和重点,其目的是要将图像中感兴趣区域提取出来,以便对分割出的目标区域进行分析处理。所以图像分割也起到了桥梁的作用,一直受到众学者极大的关注。目前传统分割方法主要分为基于区域的、基于边缘的和两者结合的图像分割方法[1]。而阈值分割是图像分割中一类最早被研究和使用的方法,其具有物理意义明确、效果明显、易于实现、实时性良好等特点[2]。其中最大類间方差法(Otsu算法)作为一种经典阈值法,也被广泛运用和发展。且在原算法上又提出基于二维直方图的二维阈值分割法(二维Otsu)[3?4]和相应的三维Otsu[5]算法,虽然比起一维算法,二维算法和三维算法抗噪性更强,不过其计算较一维Otsu算法复杂,需要消耗更多的时间,可能无法满足某些对实时性要求较高的工作。……

登录APP查看全文