Abstract
Image inpainting is the process of restoring damaged areas in an image using information available from neighboring regions. In this paper, we present a novel, efficient, and simple local image inpainting algorithm based on the Allen–Cahn (AC) equation with a fidelity term. We utilize the phase separation property of the AC equation and introduce a new phase-dependent fidelity parameter to preserve the original values in the neighboring regions of an inpainting region. The governing partial differential equation is solved using the finite difference method, with the values of the neighboring cells serving as the Dirichlet boundary condition. The proposed algorithm is both local and explicit, making it is fast and easy to implement. We demonstrate the performance of the proposed model through several numerical experiments. Furthermore, comparing this method to other image inpainting methods demonstrates its superiority in image inpainting.
Similar content being viewed by others
References
Bertalmio, M., Sapiro, G., Caselles, V., Ballester, C.: Image inpainting. In: Proceedings of the 27th annual conference on Computer graphics and interactive techniques. 417-424 (2000)
Bertalmio, M., Vese, L., Sapiro, G., Osher, S.: Simultaneous structure and texture image inpainting. IEEE T. Image Process. 12(8), 882–889 (2003)
Chan, R., Shen, L., Shen, Z.: A framelet-based approach for image inpainting. preprint. 4, 325 (2005)
Chan, T.F., Shen, J.: Variational image inpainting. Commun. Pure Appl. Math. J. Issued Courant Inst. Math. Sci. 58(5), 579–619 (2005)
Chan, T.F., Shen, J., Zhou, H.M.: Total variation wavelet inpainting. J. Math. Imaging Vis. 25(1), 107–125 (2006)
Bugeau, A., Bertalmío, M., Caselles, V., Sapiro, G.: A comprehensive framework for image inpainting. IEEE T. Image Process. 19(10), 2634–2645 (2010)
Steffens, C.R., Messias, L.R., Drews-Jr, P.J., Botelho, S.S.D.C.: CNN based image restoration. J. Intell. Robot. Syst. 99(3), 609–627 (2020)
Chang, H.H., Chen, P.F., Guo, J.K., Sung, C.C.: A self-adaptive single underwater image restoration algorithm for improving graphic quality. EURASIP J. Image Vide. 2020(1), 1–21 (2020)
Liu, G., Li, X., Wei, J.: Large-area damage image restoration algorithm based on generative adversarial network. Neural Comput. Appl. 33(10), 4651–4661 (2021)
Carrillo, J.A., Kalliadasis, S., Liang, F., Perez, S.P.: Enhancement of damaged image prediction through Cahn–Hilliard image inpainting. R. Soc. Open Sci. 8, 201294 (2021)
Zhang, K., Crooks, E., Orlando, A.: Compensated convexity methods for approximations and interpolations of sampled functions in euclidean spaces: applications to contour lines, sparse data, and inpainting. SIAM J. Imaging Sci. 11(4), 2368–2428 (2018)
Wang, N., Ma, S., Li, J., Zhang, Y., Zhang, L.: Multistage attention network for image inpainting. Pattern Recognit. 106, 107448 (2020)
Elharrouss, O., Almaadeed, N., Al-Maadeed, S., Akbari, Y.: Image inpainting: a review. Neural Process. Lett. 51(2), 2007–2028 (2020)
Thanh, D.N.H., Prasath, V.S., Dvoenko, S.: An adaptive image inpainting method based on euler’s elastica with adaptive parameters estimation and the discrete gradient method. Signal Process. 178, 107797 (2021)
Cahn, J.W.: Phase separation by spinodal decomposition in isotropic systems. J. Chem. Phys. 42(1), 93–99 (1965)
Allen, S.M., Cahn, J.W.: A microscopic theory for antiphase boundary motion and its application to antiphase domain coarsening. Acta Metall. 27(6), 1085–1095 (1979)
Zou, Q.: An image inpainting model based on the mixture of Perona–Malik equation and Cahn–Hilliard equation. J. Appl. Math. Comput. 66, 21–38 (2021)
Li, Y., Jeong, D., Choi, J.I., Lee, S., Kim, J.: Fast local image inpainting based on the Allen–Cahn model. Digital Signal Process. 37, 65–74 (2015)
Zhang, M., Zhang, G.F.: Fast image inpainting strategy based on the space-fractional modified Cahn–Hilliard equations. Comput. Math. with Appl. 102, 1–14 (2021)
Halim, A., Kumar, B.R.: An anisotropic PDE model for image inpainting. Comput. Math. Appl. 79(9), 2701–2721 (2020)
Li, Y., Xia, Q., Lee, C., Kim, S., Kim, J.: A robust and efficient fingerprint image restoration method based on a phase-field model. Pattern Recognit. 123, 108405 (2022)
Brkić, A.L., Mitrović, D., Novak, A.: On the image inpainting problem from the viewpoint of a nonlocal Cahn–Hilliard type equation. J. Adv. Res. 25, 67–76 (2020)
Qiao, Y., Zhai, S., Feng, X.: Operator splitting method based on image restoration of Allen–Cahn equation. Chin. J. Eng. Math. 35(6), 722–732 (2019)
Bertozzi, A.L., Esedoglu, S., Gillette, A.: Inpainting of binary images using the Cahn–Hilliard equation. IEEE Trans. Image Process. 16(1), 285–291 (2006)
Bosc, J., Kay, D., Stoll, M., Wathen, A.: Fast solvers for Cahn–Hilliard inpainting. SIAM J. Imaging Sci. 7(1), 67–97 (2014)
Li, Y., Jeong, D., Choi, J.I., Lee, S., Kim, J.: Fast local image inpainting based on the Allen–Cahn model. Digit. Signal Process. 37, 65–74 (2015)
Acknowledgements
The first author Jian Wang expresses thanks for the Natural Science Foundation of the Jiangsu Higher Education Institutions of China (Grant Nos. 22KJB110020). The corresponding author (J.S. Kim) was supported by the National Research Foundation(NRF), Korea, under project BK21 FOUR. We would like to extend our deepest gratitude to the reviewers for their invaluable comments and suggestions that greatly improved the quality of this manuscript.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Wang, J., Han, Z. & Kim, J. An efficient and explicit local image inpainting method using the Allen–Cahn equation. Z. Angew. Math. Phys. 75, 44 (2024). https://doi.org/10.1007/s00033-023-02184-6
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00033-023-02184-6