A fast image inpainting algorithm based on an adaptive scanning strategy





fast image inpainting algorithm, variable scale scan patches, weight similarity function, six priority matching criteria


OBJECTIVES: In exemplar-based image inpainting algorithms, there are often issues with the calculation of patch similarity for matching, suboptimal strategies for selecting matching patches, and low inpainting speed.

METHODS: This paper first uses the variable scale cross-scan block line progressive scan to solve the problem of slow scanning speed and invalid priority formula. Then, an improved weight similarity formula is used for searching to solve the problem of poor computing strategy for similar matching patches. The search range of matching patches gradually increases from small to large until globally searching for similar matching patches to improve the efficiency of inpainting. To further improve the correctness of matching patch selection, this paper uses six levels of priority matching criteria for screening.

RESULTS: The experimental results show that the inpainting effect of the proposed method is significantly improved in subjective vision, and the structural similarity (SSIM), peak signal-to-noise ratio (PSNR), and inpainting speed of the inpainting results are all improved.

CONCLUSION: For different types of images, the proposed method has a better inpainting effect and higher inpainting speed than the other three advanced methods.


Buyssens P, Daisy M, Tschumperle D, et al. Exemplar-based Inpainting: Technical Review and new Heuristics for better Geometric Reconstructions [J]. IEEE Transactions on Image Processing A Publication of the IEEE Signal Processing Society, 2015, 24(6): 1809-24.

Yudong Zhang, Pattern Recognition via PCNN and Tsallis Entropy, Sensors, 2008, 8(11):7518-7529.

T. K. Shih, Rong-Chi Chang, Liang-Chen Lu and Huan-Chi Huang, "Multi-layer inpainting on Chinese artwork [restoration applications]," 2004 IEEE International Conference on Multimedia and Expo (ICME) (IEEE Cat. No.04TH8763), Taipei, Taiwan, 2004, pp. 21-24.

T. K. Shih and Rong-Chi Chang, "Digital inpainting - survey and multilayer image inpainting algorithms," Third International Conference on Information Technology and Applications (ICITA'05), Sydney, NSW, Australia, 2005, pp. 15-24 vol.1, doi: 10.1109/ICITA.2005.169.

A. Criminisi, P. Perez and K. Toyama, "Object removal by exemplar-based inpainting," 2003 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2003. Proceedings., Madison, WI, USA, 2003, pp. II-II, doi: 10.1109/CVPR.2003.1211538.

Criminisi A, Perez P, Toyama K. Region Filling and Object Removal by Exemplar-Based Image Inpainting [J]. IEEE Transactions on Image Processing, 2004, 13(9): 1200-12.

Shui-Hua Wang, Unilateral sensorineural hearing loss identification based on double-density dual-tree complex wavelet transform and multinomial logistic regression, Integrated Computer-Aided Engineering, 2019, 26: 411-426.

S. Kumar, M. Biswas, S. J. Belongie and T. Q. Nguyen, "Spatio-temporal texture synthesis and image inpainting for video applications," IEEE International Conference on Image Processing 2005, Genova, Italy, 2005, pp. II-85, doi: 10.1109/ICIP.2005.1529997.

Li-Qin J I , Wang J J . Automatic Text Detection and Removal in Video Images[J]. Journal of Image and Graphics, 2008, 13(3):461-466.

M. Khodadadi and A. Behrad, "Text localization, extraction and inpainting in colour images," 20th Iranian Conference on Electrical Engineering (ICEE2012), Tehran, Iran, 2012, pp. 1035-1040, doi: 10.1109/IranianCEE.2012.6292505.

Elharrouss O, Almaadeed N, Al-Maadeed S, et al. Image Inpainting: A Review [Z]. Springer. 2020.

Yudong Zhang, A seven-layer convolutional neural network for chest CT-based COVID-19 diagnosis using stochastic pooling, IEEE Sensors Journal, 2022, 22(18): 17573 – 17582.

Wang M. Movie2Comics: Towards a Lively Video Content Presentation [J]. IEEE Transactions on Multimedia, 2012, 14(3): 858-70.

Huang J B, Kang S B, Ahuja N, et al. Temporally Coherent Completion of Dynamic Video [J]. ACM Transactions on Graphics, 2016, 35(6cd): 196.

Boscain U V, Chertovskih R, Gauthier J-P, et al. Highly corrupted image inpainting through hypoelliptic diffusion [J]. Journal of Mathematical Imaging and Vision, 2018, 60: 1231-45.

Boscain U V, Chertovskih R, Gauthier J P, et al. Highly corrupted image inpainting through hypoelliptic diffusion[J].

Chan T, Shen J. Local inpainting models and TV in-painting [J]. 2001.

Yu-Dong Zhang, MIDCAN: A multiple input deep convolutional attention network for Covid-19 diagnosis based on chest CT and chest X-ray, Pattern Recognition Letters, 2021, 150: 8-16.

Drori I, Cohen-Or D, Yeshurun H. Fragment-based image completion [J]. Acm Transactions on Graphics, 2003, 22(3): 303-12.

Billett S. Fast Algorithm for Completion of Images with Natural Scenes [J]. Mind Culture & Activity, 2004.

Efros A A. Image quilting for texture synthesis and transfer [J]. Computer Science Division, University of California, Berkeley, Berkeley, CA 94720, USA, 2001.

Barnes C, Shechtman E, Finkelstein A, et al. PatchMatch: A Randomized Correspondence Algorithm for Structural Image Editing [J]. ACM Trans Graph, 2009, 28(3, article 24).

Shui-Hua Wang, Diagnosis of COVID-19 by wavelet Renyi entropy and three-segment biogeography-based optimization, International Journal of Computational Intelligence Systems, 2020: 13(1): 1332-1344.

Zhang C F, Shao L P, Shi J. Improved Criminisi Algorithm Based on Adaptive Gradient Classification and Matching [J]. Journal of Chinese Computer Systems, 2018.

Tao Z, Zhang J, Wang L, et al. Image inpainting algorithm based on edge feature and pixel structure similarity [J]. Journal of Computer-Aided Design & Computer Graphics, 2019, 31(10): 1768-76.

Qiang Z, He L, Chen X, et al. Image Inpainting Using Image Structural Component and Patch Matching [J]. Jisuanji Fuzhu Sheji Yu Tuxingxue Xuebao/Journal of Computer-Aided Design and Computer Graphics, 2019, 31(5): 821.

Li X, Wang J, Liu H, et al. Image Inpainting Using Feature Precedence and Patch Matching [J]. Journal of Computer-Aided Design & Computer Graphics, 2016.

A. Wong and J. Orchard, "A nonlocal-means approach to exemplar-based inpainting," 2008 15th IEEE International Conference on Image Processing, San Diego, CA, USA, 2008, pp. 2600-2603, doi: 10.1109/ICIP.2008.4712326.

Shuihua Wang, Advances in data preprocessing for biomedical data fusion: an overview of the methods, challenges, and prospects, Information Fusion, 2021, 76: 376-421.

Tang F, Ying Y, Wang J, et al. A novel texture synthesis based algorithm for object removal in photographs; proceedings of the Advances in Computer Science-ASIAN 2004 Higher-Level Decision Making: 9th Asian Computing Science Conference Dedicated to Jean-Louis Lassez on the Occasion of His 5th Birthday Chiang Mai, Thailand, December 8-10, 2004 Proceedings 9, F, 2005 [C]. Springer.

Gong X, Liu J, Zhou W, et al. Guided depth enhancement via a fast marching method [J]. Image & Vision Computing, 2013, 31(10): 695-703.

Telea A. An Image Inpainting Technique Based on the Fast Marching Method [J]. Journal of Graphics Tools, 2004, 9(1): 23-34.

L. Zhang, P. Shen, S. Zhang, J. Song and G. Zhu, "Depth enhancement with improved exemplar-based inpainting and joint trilateral guided filtering," 2016 IEEE International Conference on Image Processing (ICIP), Phoenix, AZ, USA, 2016, pp. 4102-4106, doi: 10.1109/ICIP.2016.7533131.

Jing W, Ke L, Pan D, et al. Robust object removal with an exemplar-based image inpainting approach [J]. Neurocomputing, 2014, 123(jan.10): 150-5.

Wang J, Zhou Y H, Sima H F, et al. Image Inpainting Based on Structural Tensor Edge Intensity Model[J]. International Journal of Automation and Computing, 2021, 18(2): 256-265.

He Y, Tang X, Zhang Y, et al. Improved Criminisi algorithm based on structure tensor [J]. Journal of Image and Graphics, 2018.




How to Cite

H. R. Guo and W. H. Wang, “A fast image inpainting algorithm based on an adaptive scanning strategy”, EAI Endorsed Trans e-Learn, vol. 8, no. 4, p. e1, Aug. 2023.