Graph—Cut算法是图像及视频中经典且有效的前景和背景分离算法,针对其计算量较大导致实时性不佳、前景和背景颜色相似时分割结果易出现shrinkingbias现象的问题,提出一种改进算法.该算法利用MeanShift技术对图像进行预处理,将原图像表示成基于区域的、而不是基于像素的网结构,预处理结果还可应用于后续的前景和背景颜色分布估计过程,使得计算量大大下降;在能量函数中引入了具有自适应权值调节功能的连通性约束项,有效地改善了shrinkingbias现象,提高了分割结果的精确性.实验结果表明,文中算法具有良好的实时交互性,且分割效果更加稳定和精确.
Graph-Cut segmentation algorithm is known to be a classical and effective method for extracting foreground objects from images or videos. However, the algorithm does not usually lend itself to real time applications due to its high computational complexity. Moreover, it tends to produce so called shrinking bias phenomena when foreground and background have similar color distributions. In this paper, an improved algorithm is proposed to deal with these problems. There are two points behind our algorithm. First, a Mean-Shift technology based pre-segmentation is used so that the Graph-Cut algorithm is performed on the pre-segmented regions rather than on image pixels, thus dramatically reducing the computational overhead of the algorithm. In addition, the pre segmentation result can also be used in the subsequent estimation of the foreground and background color distributions. Second, and more importantly, a connectivity constraint with adaptive weight adjustment functionality is added as a new term to the energy function to be minimized. In this way, the shrinking bias phenomenon is remarkably mitigated and the segmentation accuracy is enhanced. Experimental results on a set of images have shown that our algorithm has good real time interactivity with stable and accurate segmentation.