Skip to main content
Log in

Image inpainting with Markov chains

  • Original Paper
  • Published:
Signal, Image and Video Processing Aims and scope Submit manuscript

Abstract

This paper presents a novel context-based image inpainting method. The proposed technique is applying Markov chains to restore the colors of objects from images affected by some external factors (like scratches or wipes) or partially covered by other objects. Thus, damages or unwanted objects can be removed from an image by replacing each pixel from such an area, based on the surrounding unaffected context information. Therefore, the restoration process is applied from the exterior to the interior, by using for replacement colors occurring with the highest probability in similar contexts. Since we use context information, the proposed inpainting technique can successfully rebuild details in images. We have compared our method with other existing inpainting techniques, and the results were better on some test images or comparable on others.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17

Similar content being viewed by others

References

  1. Aujol, J., Ladjal, S., Masnou, S.: Exemplar-based inpainting from a variational point of view. SIAM J. Math. Anal. 42(3), 1246–1285 (2010)

    Article  MathSciNet  Google Scholar 

  2. Bertalmio, M., Sapiro, G., Caselles, V., Ballester, C.: Image inpainting. In: 27th Annual Conference on Computer Graphics and Interactive Techniques, pp. 417–424. New Orleans (2000)

  3. Bertalmio, M., Vese, L., Sapiro, G., Osher, S.: Simultaneous structure and texture image inpainting. IEEE Trans. Image Process. 12(8), 882–889 (2003)

    Article  Google Scholar 

  4. Bugeau, A., Bertalmio, M., Caselles, V., Sapiro, G.: A comprehensive framework for image inpainting. IEEE Trans. Image Process. 19(10), 2634–2645 (2010)

    Article  MathSciNet  Google Scholar 

  5. Criminisi, A., Pérez, P., Toyama, K.: Region filling and object removal by exemplar-based image inpainting. IEEE Trans. Image Process. 13(9), 1200–1212 (2004)

    Article  Google Scholar 

  6. Efros, A., Leung, T.: Texture synthesis by non-parametric sampling. In: 7th IEEE International Conference on Computer Vision, pp. 1033–1038. Corfu, Greece (1999)

  7. Elharrouss, O., Almaadeed, N., Al-Maadeed, S., Akbari, Y.: Image inpainting: a review. Neural Process. Lett. 1–22 (2019)

  8. Gellert, A., Vintan, L.: Person movement prediction using hidden Markov models. Stud. Inf. Control 15(1), 17–30 (2006)

    Google Scholar 

  9. Gellert, A., Florea, A.: Investigating a new design pattern for efficient implementation of prediction algorithms. J. Digital Inf. Manag. 11(5), 366–377 (2013)

    Google Scholar 

  10. Gellert, A., Brad, R.: Context-based prediction filtering of impulse noise images. IET Image Process. 10(6), 429–437 (2016)

    Article  Google Scholar 

  11. Gellert, A., Florea, A.: Web prefetching through efficient prediction by partial matching. World Wide Web Internet Web Inf. Syst. 19(5), 921–932 (2016)

    Article  Google Scholar 

  12. Gellert, A., Brad, R.: Studying the influence of search rule and context shape in filtering impulse noise images with Markov chains. Signal Image Video Process. 12(2), 315–322 (2018)

    Article  Google Scholar 

  13. Gellert, A., Florea, A., Fiore, U., Palmieri, F., Zanetti, P.: A study on forecasting electricity production and consumption in smart cities and factories. Int. J. Inf. Manag. 49, 546–556 (2019)

    Article  Google Scholar 

  14. Guillemot, C., Turkan, M., Le Meur, O., Ebdelli, M.: Image inpainting using LLE-LDNR and linear subspace mappings. In: 38th IEEE International Conference on Acoustics, Speech, and Signal Processing, pp. 1558–1562. Vancouver (2013)

  15. Guillemot, C., Le Meur, O.: Image inpainting: overview and recent advances. IEEE Signal Process. Mag. 31(1), 127–144 (2014)

    Article  Google Scholar 

  16. Hadhoud, M.M., Moustafa, K.A., Shenoda, S.Z.: Digital images inpainting using modified convolution based method. Opt. Pattern Recognit. 7340, 1–10 (2009)

    Google Scholar 

  17. He, K., Shen, C.-N., Niu, J.-H., Huang, W.-R.: Effective inpainting method for natural textures with gradually changed illumination. SIViP 13, 69–77 (2019)

    Article  Google Scholar 

  18. Jääskinen, V., Parkkinen, V., Cheng, L., Corander, J.: Bayesian clustering of DNA sequences using Markov chains and a stochastic partition model. Stat. Appl. Genet. Mol. Biol. 13(1), 105–121 (2014)

    Article  MathSciNet  Google Scholar 

  19. Laube, P., Grunwald, M., Franz, M.O., Umlauf, G.: Image Inpainting for High-Resolution Textures using CNN Texture Synthesis. Computer Graphivs & Visual Computing, Swansea (2018)

    Google Scholar 

  20. Liu, G., Reda, F., Shih, K., Wang, T.-C., Tao, A., Catanzaro, B.: Image inpainting for irregular holes using partial convolutions. In: European Conference on Computer Vision, pp. 85–100. Munich (2018)

  21. Ma, Y., Liu, X., Bai, S., Wang, L., He, D., Liu, A.: Coarse-to-fine image inpainting via region-wise convolutions and non-local correlation. In: 28th International Joint Conference on Artificial Intelligence, pp. 3123–3129. Macao (2019)

  22. Mushtaq, A., Lee, C.-H.: An integrated approach to feature compensation combining particle filters and hidden Markov model for robust speech recognition. In: IEEE International Conference on Acoustics, Speech, and Signal Processing, pp. 4757–4760. Kyoto (2012)

  23. Oliveira, M.M., Bowen, B., McKenna, R, Chang, Y.-S.: Fast digital image inpainting. In: Proceedings of the international conference on visualization, imaging and image processing, pp. 261–266. Marbella (2001)

  24. Patel, P., Prajapati, A., Mishra, S.: Review of different inpainting algorithms. Int. J. Comput. Appl. 59(18), 30–34 (2012)

    Google Scholar 

  25. Waghchawre, A.J., Shinde, J.V.: Query mining for image retrieval system using markov chain model. In: International Conference on Emerging Trends in Computer Engineering, Science and Information Technology, pp. 109–112. India (2015)

  26. Wang, Y., Tao, X., Qi, X., Shen, X., Jia, J.: Image inpainting via generative multi-column convolutional neural networks. In: 32nd Conference on Neural Information Processing Systems, Montréal (2018)

  27. Wei, Y., Liu, S.: Domain-based structure-aware image inpainting. Signal Image Video Process. 10(5), 911–919 (2016)

    Article  Google Scholar 

  28. Xiong, W., Yu, J., Lin, Z., Yang, J., Lu, X., Barnes, C., Luo, J.: Foreground-aware image inpainting. In: 2019 IEEE Conference on Computer Vision and Pattern Recognition, Long Beach (2019)

  29. Yang, C., Lu, X., Lin, Z., Shechtman, E., Wang, O., Li, H.: High-resolution image inpainting using multi-scale neural patch synthesis. In: 2017 IEEE Conference on Computer Vision and Pattern Recognition, Honolulu (2017)

  30. Zhang, R., Ren, Y., Qiu, J., Li, G.: Base-detail image inpainting. In: 30th British Machine Vision Conference, Cardiff (2019)

Download references

Acknowledgements

We thank our former BSc student Andrei Cojanu for providing his help in adapting the Markov filter.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Arpad Gellert.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gellert, A., Brad, R. Image inpainting with Markov chains. SIViP 14, 1335–1343 (2020). https://doi.org/10.1007/s11760-020-01675-7

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11760-020-01675-7

Keywords

Navigation