# American Institute of Mathematical Sciences

November  2020, 3(4): 229-247. doi: 10.3934/mfc.2020025

## Inpainting via sparse recovery with directional constraints

 1 Department of Mathematics and Statistics, University of North Carolina Wilmington, Wilmington, NC 28403, USA 2 Department of Mathematics, Applied Mathematics and Statistics, Case Western Reserve University, Cleveland, OH 44106, USA

* Corresponding author: Xuemei Chen

Received  February 2020 Revised  October 2020 Published  November 2020

Fund Project: The first author is supported by NSF DMS-2050028

Image inpainting is a particular case of image completion problem. We describe a novel method allowing to amend the general scenario of using sparse or TV-based recovery for inpainting purposes by an efficient use of adaptive one-dimensional directional "sensing" into the unknown domain. We analyze the smoothness of the image near each pixel on the boundary of the unknown domain and formulate linear constraints designed to promote smooth transitions from the known domain in the directions where smooth behavior have been detected. We include a theoretical result relaxing the widely known sufficient condition of sparse recovery based on coherence, as well as observations on how adding the directional constraints can improve the well-posedness of sparse inpainting.

The numerical implementation of our method is based on ADMM. Examples of inpainting of natural images and binary images with edges crossing the unknown domain demonstrate significant improvement of recovery quality in the presence of adaptive directional constraints. We conclude that the introduced framework is general enough to offer a lot of flexibility and be successfully utilized in a multitude of image recovery scenarios.

Citation: Xuemei Chen, Julia Dobrosotskaya. Inpainting via sparse recovery with directional constraints. Mathematical Foundations of Computing, 2020, 3 (4) : 229-247. doi: 10.3934/mfc.2020025
##### References:

show all references

##### References:
An image to be inpainted
Forming boundary equations
Forming boundary equations: pick the best direction
Recovery via directional sensing only. (a) Image with a thin missing domain. (b) 'DB-2', all smooth directions per pixel included, both centered and shifted equations used. (c) 'DB-2', all smooth directions per pixel included, only centered equations used. (d) 'DB-2', one direction per pixel included, only centered equations used could be formed as the filter has length 2. (e) 'DB-4', all smooth directions included, both centered and shifted equations used
Examples of directional constraints adaptively formulated for the inpainting examples discussed further in the text. In both cases the 'DB2' filter of length 4 was used to form centered equations. Green dots indicate the unknown pixels around which the constraints were formed. Red dots indicate other pixels present in those constraints. The constraints are shown only for some pixels to avoid overcrowding the images. The actual results of inpainting appear later in Figures 6 and 9
Text removal of Pepper, $128\times128$
Inpaint a missing block of a vertical stripe, $64\times64$
Inpainting a thin missing block in an image with repetitive pattern of slanted stripes, $64\times64$
Inpaint a missing annulus of a sectional image, $128\times128$
Smooth stripes inpainting, $64\times64$
Text removal of a colored image, $128\times128$
Here $\sqrt{\beta} = .75$, $F$ is the reshaped 2D DB-4 wavelet basis matrix, the first filter $h$ is a high pass DB-2 filter, all smooth directions used and only centered equations included, the second filter added is a high pass DB-4 filter
 Cosine Coherence $\mu_1$ Min singular value Max singular value $P_{\Lambda} F$ 0.8541 3.8339 0 1 $SF$ (1 filter) 0.4799 0.5888 0.0455 1.5255 $S_2F$ (2 filters) 0.3913 0.4480 0.0937 1.9837
 Cosine Coherence $\mu_1$ Min singular value Max singular value $P_{\Lambda} F$ 0.8541 3.8339 0 1 $SF$ (1 filter) 0.4799 0.5888 0.0455 1.5255 $S_2F$ (2 filters) 0.3913 0.4480 0.0937 1.9837
Here $\sqrt{\beta} = .75$, $F$ is the reshaped 2D binary Weyl basis matrix, the filter $h$ is a high pass DB-2 filter, all smooth directions used and only centered equations included
 Cosine Coherence $\mu_1$ Min singular value Max singular value $P_{\Lambda} F$ 0.0667 0.0667 0 1 $SF$ (1 filter) 0.0452 0.0457 0.0455 1.5255
 Cosine Coherence $\mu_1$ Min singular value Max singular value $P_{\Lambda} F$ 0.0667 0.0667 0 1 $SF$ (1 filter) 0.0452 0.0457 0.0455 1.5255
 [1] Sören Bartels, Jakob Keck. Adaptive time stepping in elastoplasticity. Discrete & Continuous Dynamical Systems - S, 2021, 14 (1) : 71-88. doi: 10.3934/dcdss.2020323 [2] Li-Bin Liu, Ying Liang, Jian Zhang, Xiaobing Bao. A robust adaptive grid method for singularly perturbed Burger-Huxley equations. Electronic Research Archive, 2020, 28 (4) : 1439-1457. doi: 10.3934/era.2020076 [3] Ke Su, Yumeng Lin, Chun Xu. A new adaptive method to nonlinear semi-infinite programming. Journal of Industrial & Management Optimization, 2020  doi: 10.3934/jimo.2021012 [4] Tengfei Yan, Qunying Liu, Bowen Dou, Qing Li, Bowen Li. An adaptive dynamic programming method for torque ripple minimization of PMSM. Journal of Industrial & Management Optimization, 2021, 17 (2) : 827-839. doi: 10.3934/jimo.2019136 [5] Gang Bao, Mingming Zhang, Bin Hu, Peijun Li. An adaptive finite element DtN method for the three-dimensional acoustic scattering problem. Discrete & Continuous Dynamical Systems - B, 2021, 26 (1) : 61-79. doi: 10.3934/dcdsb.2020351 [6] Zuliang Lu, Fei Huang, Xiankui Wu, Lin Li, Shang Liu. Convergence and quasi-optimality of $L^2-$norms based an adaptive finite element method for nonlinear optimal control problems. Electronic Research Archive, 2020, 28 (4) : 1459-1486. doi: 10.3934/era.2020077

Impact Factor:

## Tools

Article outline

Figures and Tables