Message Board

Dear readers, authors and reviewers,you can add a message on this page. We will reply to you as soon as possible!

2019 Volume 44 Issue 3
Article Contents

Dong HAN, Chun-hua WANG. On Image Inpainting Algorithm Based on Curvature Constraint Factor and Edge Weighted Rule[J]. Journal of Southwest China Normal University(Natural Science Edition), 2019, 44(3): 95-100. doi: 10.13718/j.cnki.xsxb.2019.03.016
Citation: Dong HAN, Chun-hua WANG. On Image Inpainting Algorithm Based on Curvature Constraint Factor and Edge Weighted Rule[J]. Journal of Southwest China Normal University(Natural Science Edition), 2019, 44(3): 95-100. doi: 10.13718/j.cnki.xsxb.2019.03.016

On Image Inpainting Algorithm Based on Curvature Constraint Factor and Edge Weighted Rule

More Information
  • Received Date: 14/07/2017
    Available Online: 20/03/2019
  • MSC: TP391

  • In view of the current image restoration algorithm more mainly through variance and measurement method of image block to complete image restoration, ignoring the significant edge characteristics of image block, the image restoration effect and not prone to fuzzy continuous effects and other undesirable phenomena, resulting in poor performance of the repair algorithm.In this paper, a research of image inpainting algorithm based on curvature constraint factor and edge weighted rule has been proposed.Firstly, the curvature constraint factor has been constructed through the pixel's luminance direction, and the data item has been constrained to form a priority measurement function, and the priority patch block been selected by the priority measurement function.Then, the pixel autocorrelation model has been constructed by the difference between the mean values of the pixels, and the size of the sample block been adjusted.Finally, the edge weighted model has been constructed by taking the salient edge of sample block as constraint.Through edge weighted model combined with SSD model, the edge weighting rule has been established, and the optimal matching block been searched to repair the patch block.Simulation results show that compared with the current image inpainting algorithm, the image inpainting algorithm designed by this paper has a good visual effect.
  • 加载中
  • [1] 王丽丹, 段书凯, 段美涛.忆阻Fourier神经网络在图像复原中的应用[J].西南大学学报(自然科学版), 2014, 54(1):36(1):1-6.

    Google Scholar

    [2] 付强, 孙秀霞, 刘树光.显著边缘直接引导的动态模糊图像盲复原方法[J].重庆邮电大学学报(自然科学版), 2016, 12(1):87-94.

    Google Scholar

    [3] LIU H M, BI X H, YE Z F.Arc Promoting Image Inpainting Using Exemplar Searching and Priority Filling[J]. Journal of Image and Graphics, 2016, 21(8):993-1003.

    Google Scholar

    [4] 周亚同, 王丽莉, 唐红梅.基于压缩感知的稀疏度自适应图像修复[J].铁道学报, 2014, 36(9):52-59. doi: 10.3969/j.issn.1001-8360.2014.09.11

    CrossRef Google Scholar

    [5] 王梅, 赵彩, 郭勇.基于重构样本区域的数字图像修复算法研究[J].软件导刊, 2014, 13(2):71-73. doi: 10.3969/j.issn.1672-7800.2014.02.030

    CrossRef Google Scholar

    [6] LIAO B, SU T, LIU B. Multi-Scale Decomposition Based k-Nearest-Neighbor Random Search for Fast Image Completion[J].Journal of Electronics and Information Technology, 2015, 37(9):2097-2102.

    Google Scholar

    [7] 黄江林, 刘红, 陶少杰.一种改进的基于K-SVD字典的图像修复算法[J].安徽大学学报(自然科学版), 2013, 37(3):69-74. doi: 10.3969/j.issn.1000-2162.2013.03.013

    CrossRef Google Scholar

    [8] 唐利明, 谭艳婷, 方壮.基于结构分量和信息熵的Criminisi图像修复算法[J].光电子·激光, 2016, 21(8):993-1003.

    Google Scholar

    [9] BILDHAUER M, FUCHS M, WEICKERT J.Denoising and Inpainting of Images Using Tv-Type Energies:Theoretical and Computational Aspects[J].Journal of Mathematical Sciences, 2016, 219(6):899-910. doi: 10.1007/s10958-016-3153-y

    CrossRef Google Scholar

    [10] 马爽, 谈元鹏, 许刚.块关联匹配与低秩矩阵超分辨融合的图像修复[J].计算机辅助设计与图形学学报, 2015, 27(2):271-278.

    Google Scholar

    [11] 康佳伦, 唐向宏, 任澍.结构约束和样本稀疏表示的图像修复[J].中国图像图形学报, 2013, 18(11):1425-1434.

    Google Scholar

    [12] WANG B H, GUO S W, JI G.Study on Image Inpainting Based on Boolean Cloud Model Algorithm[J].Science Technology and Engineering, 2013, 17(13):4983-4986.

    Google Scholar

    [13] 邓悟, 吴笛, 滕奇志.基于区域填充的图像修复算法研究[J].计算机与数字工程, 2014, 42(3):495-498. doi: 10.3969/j.issn.1672-9722.2014.03.034

    CrossRef Google Scholar

    [14] 耿卫江.结构相似度索引耦合最优稀疏表示的大规模损坏图像动态修复[J].科学技术与工程, 2014, 25(14):107-114. doi: 10.3969/j.issn.1671-1815.2014.14.020

    CrossRef Google Scholar

    [15] 张志龙, 杨卫平, 李吉成.一种基于蚁群优化的显著边缘检测算法[J].电子与信息学报, 2014, 36(9):2061-2067.

    Google Scholar

    [16] CHEN Z, DAI C, JIANG L, et al.Structure-Aware Image Inpainting Using Patch Scale Optimization[J].Journal of Visual Communication and Image Representation, 2016, 40:312-323. doi: 10.1016/j.jvcir.2016.06.029

    CrossRef Google Scholar

    [17] LIU W, ZHANG D, CUI M, et al.An Enhanced Depth Map Based Rendering Method with Directional Depth Filter and Image Inpainting[J].The Visual Computer, 2016, 32(5):579-589. doi: 10.1007/s00371-015-1074-2

    CrossRef Google Scholar

    [18] 吴玉莲, 冯象初.联合平衡正则项的卡通纹理非凸图像修复[J].西安电子科技大学学报(自然科学版), 2014, 41(5):162-168.

    Google Scholar

    [19] 张志伟, 马杰, 夏克文.一种应用于图像修复的非负字典学习算法[J].光电子·激光, 2014, 25(8):1613-1619.

    Google Scholar

    [20] 高飞, 王佳君, 喻强.区别结构和纹理的稀疏表示图像修复算法[J].计算机工程, 2016, 42(3):242-248. doi: 10.3969/j.issn.1000-3428.2016.03.044

    CrossRef Google Scholar

  • 加载中
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Figures(5)

Article Metrics

Article views(1098) PDF downloads(104) Cited by(0)

Access History

Other Articles By Authors

On Image Inpainting Algorithm Based on Curvature Constraint Factor and Edge Weighted Rule

Abstract: In view of the current image restoration algorithm more mainly through variance and measurement method of image block to complete image restoration, ignoring the significant edge characteristics of image block, the image restoration effect and not prone to fuzzy continuous effects and other undesirable phenomena, resulting in poor performance of the repair algorithm.In this paper, a research of image inpainting algorithm based on curvature constraint factor and edge weighted rule has been proposed.Firstly, the curvature constraint factor has been constructed through the pixel's luminance direction, and the data item has been constrained to form a priority measurement function, and the priority patch block been selected by the priority measurement function.Then, the pixel autocorrelation model has been constructed by the difference between the mean values of the pixels, and the size of the sample block been adjusted.Finally, the edge weighted model has been constructed by taking the salient edge of sample block as constraint.Through edge weighted model combined with SSD model, the edge weighting rule has been established, and the optimal matching block been searched to repair the patch block.Simulation results show that compared with the current image inpainting algorithm, the image inpainting algorithm designed by this paper has a good visual effect.

  • 图像修复技术成为了当下数字图像处理技术的研究热点之一.图像修复的本质是利用图像破损区域以外的已知信息对破损的局部信息进行有效重建,使得修复出来的图像能够近似原图像的整体视觉[1-3].近几年涌现了许多图像修复算法[4-7],但是这些算法大都忽略了图像块的显著边缘特性,使得修复图像出现模糊效应以及不连续效应等不良现象.

    对此,本文提出了一种基于曲率约束因子耦合边缘加权法则的图像修复算法.将通过等照度线构造的曲率约束因子加入优先级的计算,构造了优先级度量函数,对待修复像素点的优先级进行度量,确定优先修补块.通过像素点之间的均值差构造了像素自相关模型,进而对样本块大小进行调节.利用样本块显著边缘构造的边缘加权模型,联合SSD模型建立了边缘加权法则,搜索最优匹配块完成图像修复.仿真实验表明,本文所提算法具有良好的鲁棒性能以及修复性能.

1.   本文图像修复算法设计
  • 本文图像修复算法利用等照度线方向构造曲率约束因子对数据项进行改进,构造优先级度量函数从损坏区域中选取优先修补块,为图像修复的有序性提供了保障.通过像素点之间的均值差构造了像素自相关模型,调整了样本块的大小,提高了算法的修复质量以及修复效率.利用样本块显著边缘构造了边缘加权模型,并以边缘加权模型以及SSD模型为基础建立了边缘加权法则,实现了对最优匹配块的精确搜索.本文算法设计的流程图如图 1所示.

  • 在如图 2所示的图像P中,θ表示待修复区域,β=P-θ表示源区域,源区域与待修复区域的相交处用∂β表示.令r为∂β上的一个待修复像素点,Kr为以r为中心的一个待修补块.则其优先修补块选择函数可表述为[8-9]

    其中C(r)和D(r)分别为置信度项以及数据项,C(r)和D(r)的表达式分别如(2)式和(3)式所示.

    其中:|Kr|为待修补块Kr的面积,∇Prnr分别为像素点r处的等照度线方向以及法线向量[10].

    对于待修补块而言,其纹理连续性与等照度线的曲率有着一定的关联,等照度线的曲率越小,则表示待修补块对应的纹理连续性能越理想,该待修补块的优先级就越高[11-12].对此,本文通过等照度线方向构造了曲率约束因子:

    将曲率约束因子带入(3)式对数据项进行改进:

    其中δε为调节因子.通过实验得出δ取值为2,ε取值为0.3.

    将改进的数据项$ \overline {D(r)} $带入(1)式,便构造出了本文的优先级度量函数:

    利用优先级度量函数对待修复区域中的所有待修复像素点的优先级进行度量,选取优先级最大值像素点对应的待修补块作为优先修补块.

  • 利用固定大小的样本块进行图像修复,难以适应图像纹理结构的变化需求,导致修复图像容易出现不连续效应以及块效应等[13-14].对此,本文将利用像素点的均值之差构造像素自相关模型,对样本块的大小进行调整.

    令图像的尺寸为M×Mw(xy)为待修补块中一个已知像素点,选择与w(xy)之间的距离为m的4个像素点w(x-my),w(x+my),w(xy-m),w(xy+m),通过求w(xy)与这4个像素点的均值之差来得到像素差值Dw(xy)

    通过Dw(xy)与其4个相邻像素差值的均值相乘,即可构造像素自相关模型,对样本块的大小进行调整.构造的像素自相关模型表述如下:

    其中n表示待修补块中已知像素点的个数.

    通过求取像素点对应的RZ值,通过下述调节模型,便可求出样本块的大小SZ

    其中TS为预设阀值.

  • 当前较多图像修复算法往往只注重于对待修补块的整块修复,而忽略了待修补块的边缘特征,导致修复的图像中存在不连续效应以及振铃效应.为了克服这些不足,利用样本块显著边缘为约束,构造边缘加权模型.建立以边缘加权模型联合SSD模型为基础的边缘加权法则,对最优匹配块进行搜索,用于对待修补块进行修复.具体的边缘加权法则表述如下:

    首先,建立边缘加权模型.令Kr为以像素点r为中心的一个确定尺寸的样本块,rir′iKr中任意两个像素点则构造的边缘加权模型如下:

    其中Br表示Kr的显著边缘,可通过蚁群优化算法[15-16]进行检测. E(rri)定义如下

    其中(x1y1)与(x2y2)分别为rri的坐标.

    其次,引入SSD模型,

    其中:Kz表示源区域中的匹配块;RxGxBx表示像素点x对应的红色、绿色、蓝色分量[17-18].

    最后,联合(11)式和(12)式形成最优匹配块搜索模型:

    通过(13)式从源区域中选取最小P(KrKz)值对应的匹配块Kz作为最优匹配块.

2.   仿真实验分析
  • 本文实验将MATLAB 7.0软件作为仿真工具,在Intel酷睿I5 2.4 GHz双核处理器、500 GB硬盘、2 GB内存、Windows 7.0操作系统的计算机上进行仿真测试.实验采用对比方法,将文献[19]以及文献[20]中的图像修复算法作为对照组,以对本文算法的修复性能进行对比.

  • 不同算法对灰度图像以及彩色图像的修复效果对比分析图分别如图 3图 4所示.由图 3可知:文献[19]算法(图 3(c))存在残留效应以及块效应;文献[20]算法(图 3(d))存在模糊效应以及振铃效应;而本文算法修复结果图(图 3(e))不存在不良现象.由图 4可知3种算法都具有较好的修复效果,但是将不同算法的修复区放大对比可见:文献[19]算法(图 4(d))存在不连续效应以及修复残留;文献[20]算法(图 4(f))存在不连续效应以及模糊效应;本文算法(图 4(h))具有最好的修复效果,不存在这些不良效应.修复效果说明本文算法具有较理想的修复性能以及较好的鲁棒性能,能克服修复过程中产生的块效应以及不连续效应等不足.究其原因为本文利用等照度线方向构造了曲率约束因子,对数据项进行改进,构造了优先级度量函数,从损坏区域中选取了优先修补块,为图像修复的有序性提供了保障,提高了算法的修复质量.同时本文还利用样本块显著边缘为约束,构造边缘加权模型.建立以边缘加权模型联合SSD模型为基础的边缘加权法则,对最优匹配块进行搜索,有效对不连续效应等不良效应进行了抑制.

  • 峰值信噪比对比图通过量化测试的方法对本文算法的修复性能进行测试.峰值信噪比(Peak Signal to Noise Ratio,PSNR)能够在一定程度上对修复后图像与原图像的近似度进行客观反映.对此,本文将修复后图像的峰值信噪比作为量化指标.测试过程中将图 4(a)作为测试目标,测试方法为对测试目标设置不同程度的像素丢失比例,通过不同算法对其进行修复,并求取修复后图像的峰值信噪比.

    图 5为不同算法修复图像的峰值信噪比对比图.与图 5可知,本文算法修复的图像具有较高的峰值信噪比,和原图像的近似度最高.因为本文通过像素点之间的均值差构造了像素自相关模型,调整了样本块的大小,提高了算法的修复质量.同时本文还将样本块的边缘特性加入最优匹配块的搜索方法中,提高了最优匹配块的搜索精度以及正确度,使得算法的修复效果进一步得到了提升.

3.   结论
  • 本文提出了一种基于曲率约束因子耦合边缘加权法则的图像修复算法.通过等照度线方向构造的曲率约束因子形成优先级度量函数,从待修复区域中选取优先修补块,使得算法能按照更为有效的修复次序进行修复.利用像素点之间的均值差构造了像素自相关模型,实现了样本块大小的调节功能,使得算法修复图像的质量以及算法的修复效率得以提高.以构造的边缘加权模型与SSD模型为基础,建立了边缘加权法则,准确选取最优匹配块,使得算法的修复质量以及算法的鲁棒性能进一步得到了提高.

Figure (5)  Reference (20)

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return