所谓复杂图像抠图就是从复杂图像中抠取出目标物体的一种图像处理算法。为了取得更好的抠图效果,提出了一种基于马尔可夫随机场的自然图像抠图方法。该方法首先手工把图像分成3个区域:前景区域、背景区域和未知区域;然后,再将未知区域用手工粗略地划分成几个相交的小区域;接着在每一个小区域内,以其中的未知区域的像素点为节点,定义抠图标号,同时在这些节点上面建立MRF抠图模型,并把这些标号赋给这些节点,这样抠图问题被定义为在这个MRF模型和它的Gibbs分布上MAP估计问题;继而再计算出每个小区域的掩像;最后把这些掩像合并,即得到输入图像最终的掩像。和其他算法相比,对复杂图像的抠图问题,该方法可以取得更好的抠图效果。
Natural image matting is an important algorithm on image processing to extract the foreground objects from the background image. This paper proposes a Markov random field(MRF) model-based approach to natural image matting with complex scenes. The image is manually, divided into three regions:fore-region, back-region and unknown region, which is segmented into several sub-regions. In each sub-region, we partition the colors of neighboring background or foreground pixels into several clusters in RGB color space and assign matting label to each unknown pixel. Each label is modeled as an MRF and the matting problem is then formulated as a maximum a posteriori (MAP) estimation problem. Simulated annealing is used to find the optimal MAP estimation. The better results can be obtained under the same user-interactions when the image is complex. Results of natural image matting experiments performed on complex images using this approach are shown and compared in this paper.