当目标和背景的类内方差差距较大时,传统图像分割算法Otsu会将类内方差较大的类中部分像素划分到类内方差较小的类,造成错误分割,针对这种情况,提出一种基于梯度熵的Otsu算法。利用梯度值分析求出目标和背景的分界点;针对目标和背景分别进行有选择性的线性拉伸,使目标和背景满足类内方差差距小的条件;对处理后的图像采用Otsu算法进行分割。实验结果表明,该算法能有效避免传统Otsu阈值偏向方差大的一类的情况发生,从客观和主观角度进行图像分割质量评价,效果良好。
While the within-class variance between targets and the background is large,the traditional Otsu algorithm classifies some pixels of the class with big variance into the other class,which results in wrong segmentation result.The Otsu method based on stretched gradient entropy was presented.Firstly gradient analysis was used to calculate demarcation point between targets and the background.Then targets and the background were selectively linear stretched,so as to meet small gap conditions of the class variance between targets and the background.Finally Otsu algorithm was used for the preprocessed image segmentation.Experimental results show that the algorithm can effectively solve the traditional Otsu threshold algorithm's problem that it tends to be closer to the class with larger variance.From the subjective and objective view,the quality assessment of image segmentation algorithm demonstrates that the algorithm has good effect.