图像修复问题公式化为一个能量函数的最优化问题,设计了合理的能量函数度量修复结果的质量,并通过迭代方法得到最优解.全局优化方法不仅保持像素局部颜色的连续性,而且也很好地保持了图像整体纹理结构在修复区域内的连续性.在构建像素邻域的搜索空间时,采用了自适应的采样方法,减小了搜索空间的大小,大大提高了搜索最佳匹配邻域的速度.实验结果表明,算法对大面积的图像缺失的修补和复杂背景图像上多余物体的去除,都达到了很好的效果.
Image completion, which aims to remove objects or recover the damaged portions in a given image, is an important task in photo editing. Recently, exemplar-based methods are considered to complete images with large portions removed. However, structure inconsistency of the reconstructed texture often appear when using those methods. In this paper, a new exemplar-based algorithm is proposed to obtain global texture consistency by using global optimization. First, an energy function is defined for measuring the quality of the reconstructed region. Then, the image completion problem is formulated as minimization of the energy function which is done in an iterative form. Finally, the slight color differences between the known region and the filled region are revised by the Poisson image editing method. Compared with the existing exemplar-based methods which do greedy region- growing, the proposed method not only reconstructs the local color texture of missing region, but also preserves the global structural texture of the image. An adaptive sampling method, which is based on the saliency map of the image, is also adopted to construct the searching space. It dramatically reduces the searching space and accelerates the nearest neighbor searching. The effectiveness of the proposed method is demonstrated on several examples and comparisons.