为了提高二维阈值分割法的处理速度,提出二维类间方差最大法的快速实现方法.首先,将二维最佳阈值(s*,t*)的求解拆分成两个一维最佳阈值s*和t*的求解,并引入类内距离的定义,提出新的最佳阈值判别式.其次,将原二维直方图分成M×M个区域,合并每个区域为一点,并构建新的二维直方图,在其上应用本文改进的阈值判别式D(s*,t*)求解,得到分割阈值所在的区域编号.最后,在该区域内再次使用D(s*,t*)求解得到原始图像的最佳分割阈值.理论分析及针对不同信噪比的多幅图像的实验结果表明,本文方法的分割错误率低于原始二维Otsu法,且将原算法的时间复杂度由O(L4)降为O(L1/2),空间复杂度由S(L2)降为S(2L).
In order to shorten the running time of 2D threshold segmentation algorithm,a fast implementation of 2D Otsu was developed. First,a two-dimensional optimal threshold (s*,t*)was split into two one-dimensional optimal thresholds,s* and t*. The intra-class variance was defined to propose a new optimal discriminant D(s*,t*). Then the original 2D histogram was divided into M × M regions,and each region was combined as a point to form a new 2D histogram. Based on this new 2D histogram,the discriminant D(s*,t*)was solved to determine the region that corresponds to the optimal threshold,and last the optimal threshold was calculated using D(s*,t*). The theoretical analysis and experimental results of some images with different signal-to-noise ratios (SNRs ) show that the segmentation error rate of the proposed algorithm is lower than the original two-dimensional Otsu method. The time complexity of the proposed method is reduced from O(L4 )to O(L1/2 ),and space complexity is reduced f