This repository contains an implementation of a convex optimization-based approach to the Regularized Image Inpainting Problem.
The goal is to recover a digital color image
A corruption mask
The inpainting task is framed as a minimization problem using nuclear norm regularization to promote low-rank structures in the recovered image:
Where:
-
$\sigma > 0$ is a regularization parameter. -
$|Z|_*$ denotes the nuclear norm (sum of singular values). -
$\tilde{X} = [X_R^T \quad X_G^T \quad X_B^T]^T$ represents the vertically stacked channels.
The solution is reached by finding a fixed point of the operator
Iterating
-
algorithm.py: Contains the core logic for the iterative inpainter. It implements the sequence generation$Y_{k+1} = T(Y_k)$ to find the approximate solution for the regularized problem. -
utils.py: A collection of mathematical tools and helper functions, including:- Definitions for proximal operators.
- The linear operator
$\mathcal{A}$ for image corruption. - Nuclear norm calculation tools.
- Plotting functions to visualize the original, corrupted, and reconstructed images across various
$\sigma$ parameters.
Figure 1: Images obtained for different values of σ with γ = 1 and 50% erased pixels.