Abstract
Traditional image inpainting methods often rely on Mean Squared Error (MSE) minimization, which frequently leads to blurry, perceptually unsatisfying results. This paper presents a novel approach that utilizes the Structural Similarity (SSIM) index as the optimization criterion. By reformulating the non-convex SSIM maximization into a solvable quasi-convex problem, the proposed method achieves sharper, more natural texture reconstructions. Experimental results on complex datasets like the "Grand Canyon" demonstrate that optimizing for perceptual similarity rather than pixel-wise error significantly enhances visual quality.
Introduction
Image inpainting is a critical task in computer vision, used for restoring damaged photographs or removing unwanted objects. The primary challenge is to fill missing regions such that the modification is indistinguishable from the original texture. Most conventional algorithms minimize the Mean Squared Error (MSE). However, MSE is poorly correlated with human visual perception; it tends to average pixel values, resulting in "ghosting" effects and loss of fine structural detail. This paper addresses the "perceptual gap" by leveraging the SSIM index, which explicitly models luminance, contrast, and structural information to better mimic human vision.
Methodology
The proposed framework consists of two primary stages: SSIM-based patch selection and perceptually optimized reconstruction.
SSIM-Based Patch Selection
To reconstruct a target region, a dictionary of candidate patches is extracted from the known parts of the image. Unlike standard methods that use Euclidean distance, this algorithm employs an iterative selection process to identify $M$ local patches that maximize the SSIM index relative to the target's neighborhood.
Perceptually Optimized Reconstruction
The missing texture is modeled as a linear combination of the selected patches. The core innovation lies in the optimization objective: maximizing the SSIM index. Since the SSIM formula is non-convex, the authors reformulate it as a quasi-convex optimization problem. This allows for the efficient calculation of optimal coefficients using a Lagrange multiplier approach and a bisection procedure.
Experimental Results
The method was evaluated on high-resolution images with complex textures, most notably the "Grand Canyon" dataset, where large text overlays were removed.
Quantitative Performance
The proposed method consistently outperformed benchmarks, including exemplar-based and sparse representation methods. In the "Grand Canyon" test, the SSIM-optimized approach achieved a score of 0.9435, surpassing the sparse representation method (0.9324) and the MSE-based version of itself (0.9421). Interestingly, the method often produced higher MSE values than MSE-based techniques, yet provided superior visual clarity, confirming that lower MSE does not equate to better perceptual quality.
Qualitative Analysis
Visual comparisons reveal that the SSIM-based approach preserves "texture roughness"—the fine-grained details that MSE-based methods typically smooth away. The reconstruction avoids common pitfalls like color discontinuities and blurring at the boundaries of the inpainted region.
Discussion and Conclusion
The primary insight of this work is that the contrast term in the SSIM index effectively measures texture roughness. By maximizing this term, the algorithm maintains the "grit" of natural textures. While the reconstruction step is highly efficient (0.026 seconds), the patch selection process remains computationally intensive, taking over 16 minutes per target patch. Future research will focus on accelerating the selection algorithm and automating parameter tuning to make the method viable for real-time applications. In conclusion, shifting from MSE to SSIM-based optimization represents a significant step toward perceptually accurate image restoration.
Summary updated