Abstract
Traditional image inpainting methods often rely on Mean Square Error (MSE) for optimization, which frequently leads to blurry results that do not align with human visual perception. This paper presents a novel framework that utilizes the Structural Similarity (SSIM) index as the primary optimization criterion within a sparse representation model. By reformulating SSIM-based sparse coding and dictionary learning, the proposed method achieves superior visual reconstruction of missing textures and structures.
Introduction
Image inpainting is the process of restoring missing or damaged regions in an image. While variational and exemplar-based methods have been widely used, recent advancements have focused on sparse representation. In this paradigm, an image patch is modeled as a linear combination of a few atoms from an overcomplete dictionary. However, the standard reliance on MSE as a loss function often results in "average" solutions that lack sharp detail. This work addresses this limitation by integrating the SSIM index, a metric better suited to the human visual system (HVS), into the sparse representation pipeline.
Methodology
The core of the proposed approach is the transition from MSE-based optimization to SSIM-based optimization across all stages of the inpainting process.
Sparse Representation Framework
The fundamental model represents a target signal $y$ (or matrix $Y$) as a sparse combination of atoms from a dictionary $D$.
In this framework, the authors replace the standard MSE minimization with SSIM maximization. Since the SSIM index is non-convex, the authors utilize a quasi-convex optimization strategy. By fixing the mean of the patch, the problem becomes solvable using bisection and Lagrange multiplier techniques.
Dictionary Learning and Patch Priority
The dictionary is constructed from known patches within the image. To maintain perceptual consistency, the dictionary update step—traditionally performed via SVD in K-SVD—is replaced with a steepest ascent algorithm optimized for the SSIM index.
The order of inpainting is determined by a priority function based on the classic "Criminisi" approach. This function considers both the confidence of the surrounding pixels and the presence of structural "isophotes" (linear structures) to ensure that important edges are reconstructed first.
Experimental Setup
The method was evaluated using 11 diverse test images, including natural landscapes (e.g., "Grand Canyon"), urban scenes ("Buildings in Tokyo"), and standard benchmarks like "Lena." Challenges included removing text overlays (covering approximately 10% of the image) and filling random missing blocks of 8x8 and 16x16 pixels.
Results and Discussion
Quantitative analysis showed that the proposed SSIM-based method consistently outperformed state-of-the-art PCA, exemplar-based, and MSE-based sparse representation techniques. For instance, on "Image 1," the method achieved an SSIM score of 0.7811, compared to 0.7145 for the leading MSE-based sparse method.
Qualitatively, the SSIM-optimized reconstruction preserved sharp edges and natural textures where MSE-based methods produced blurring or "ghosting" artifacts. The method demonstrated significant robustness in reconstructing larger 16x16 blocks in complex images without the patchy appearance typical of simple exemplar-based copying.
Conclusion
By prioritizing human perception over mathematical precision, this SSIM-based sparse representation framework offers a significant improvement in image inpainting quality. While the computational cost is currently higher than traditional methods—ranging from 4.3 to 12.5 times slower—the visual gains suggest that perceptual metrics are a vital direction for future image restoration research. Future work will focus on optimizing the algorithm for real-time applications through parallel processing.
Summary updated