为了得到更好的图像修补结果,提出了一种在分形仿射变换框架下引入两类约束的图像修补算法。分形仿射变换包含几何、同构和亮度3种变换。首先,对选取的定义域块进行前两种分形仿射变换,利用所得的数据块构造码本,并将其作为新的搜索匹配范围。其次,采用改进的双边滤波器,抽取待修补图像的细节图,继而构造权值图。然后,在亮度变换过程中,为待修复块与码本块之间的误差能量函数引入两类约束条件,并通过最小化约束能量函数,导出新的亮度变换参数。引入的两类约束,一是待修复块与码本块在已知像素点上的加权一致性约束,权重为从权值图上获取的权值块;二是待修复块的邻域块与码本块在丢失像素点上的相似性约束。最后,采用约束能量最小的估计块来填补待修复块。实验结果表明,与已有的同类算法相比,本文方法能更好地保留结构特征的连续性,新填充区域与源区域过渡更加自然,修补结果的主观质量和客观评价指标都得到了显著提高。
This paper proposes a novel image restoration algorithm introducing two types of constrains under the framework of fractal affine transformation.The fractal affine transformation consists of geometrical transformation,isomorphic transformation and luminance transformation.Firstly,some domain blocks are selected and then transformed by the first two fractal affine transformations.Using the resulting patches,the codebook is constructed and served as the new searching scope.Secondly,the detail of the damaged image is extracted using the improved bilateral filter,and then the weight map is obtained according to the extracted image detail.Thirdly,during the luminance transformation,its two parameters are derived through minimizing a constrained energy function between the target patch and each codebook patch.In the constrained energy function,we introduce two types of constraints:one is the weighted consistency constraint between the codebook patch and the target patch over the already known pixels,where the weight patch is obtained from the weight map,and the other is the neighborhood similarity constraint between the codebook patch and the weighted mean of the neighboring patches over the missing pixels.Lastly,the target patch is filled with the estimated patch containing the minimum constrained energy.The experiment results show that compared with the existing congeneric algorithms,the proposed one preserves better continuity of the broken structure and forces the newly filled area to be more consistent with the source area.Therefore,the restored results are improved both subjectively and objectively.