Efficient Parallel Algorithms for Inpainting-Based Representations of 4K Images - Part II: Spatial and Tonal Data Optimization

Niklas Kämper, Vassillen Chizhov, Joachim Weickert · DOI

Introduction

Inpainting-based image compression offers a compelling alternative to traditional transform-based codecs like JPEG. Instead of storing a full grid of pixel data, these methods store a sparse subset of pixels—a "mask"—and reconstruct the full image using a mathematical operator, such as homogeneous diffusion. However, the efficacy of this approach depends entirely on the quality of the mask. To achieve high fidelity, one must optimize both the spatial locations of the pixels and their tonal values to minimize reconstruction error.

While recent advances have made the reconstruction (inpainting) process real-time for 4K resolutions, the optimization of the mask data has remained a significant computational bottleneck. Previous high-quality optimization methods were too slow for practical use at high resolutions, while faster heuristics often resulted in significant loss of fidelity. This paper introduces a suite of highly parallelized GPU algorithms designed to perform both spatial and tonal optimization for 4K images in under one second.

Spatial Optimization: Delaunay-Based Densification

The goal of spatial optimization is to select a set of pixel locations that best capture the image's structural information. The authors employ a densification strategy that starts with a sparse set and iteratively adds pixels in regions where the reconstruction error is highest.

To ensure an even distribution and prevent pixel "clumping," the algorithm utilizes Delaunay triangulation to partition the image domain. To maintain high performance on the GPU, the authors implement the Jump Flood Algorithm (JFA) to efficiently approximate Voronoi cells, which in turn facilitates the triangulation process. The choice of Delaunay triangulation over simpler Voronoi-based partitioning is critical; it produces more regular, non-elongated triangles that better align with the influence regions of the diffusion operator, leading to superior reconstruction quality.

Tonal Optimization: Parallel Domain Decomposition

Once the spatial mask is established, the values (colors) of the mask pixels must be optimized. This is a large-scale least-squares problem: finding the values that, when used as boundary conditions for the diffusion operator, minimize the Mean Squared Error (MSE) across the entire reconstructed image.

The authors address this using a Restricted Additive Schwarz (RAS) domain decomposition solver. By breaking the 4K image into smaller, overlapping blocks, the solver can process data in parallel across the GPU's many cores. A key innovation in this stage is the Voronoi Initialization. Rather than starting the solver with the original pixel colors, the authors initialize the system using a Voronoi-based approximation. This provides a much closer initial guess to the optimal solution, significantly accelerating the convergence of the underlying linear solver.

To manage the massive memory requirements of 4K images, the system is implemented in a matrix-free fashion. By avoiding the explicit storage of the large system matrix, the algorithm remains compatible with standard consumer-grade hardware like the Nvidia GTX 1080 Ti. All of this is built on top of a fast multigrid ORAS (Optimized Restricted Additive Schwarz) inpainting solver.

Results and Performance

The proposed framework was evaluated on a dataset of twelve representative 4K images featuring various textures and structures. The results demonstrate exceptional performance across several metrics.

Speed and Scaling

The entire optimization pipeline—both spatial and tonal—completes in less than one second for a 4K color image. This represents an order-of-magnitude improvement over previous state-of-the-art tonal optimization methods, which could take up to ten minutes for similar resolutions. Furthermore, the algorithms exhibit near-ideal linear scaling; the runtime increases linearly with the number of pixels, ensuring the method's viability for even higher resolutions (e.g., 8K).

Reconstruction Quality

In terms of fidelity, the proposed "Delaunay Densification" (DD) method significantly outperforms existing benchmarks:

  • +6 dB PSNR improvement over the "Analytic Approach."
  • +3.8 dB PSNR improvement over "Probabilistic Sparsification" (PS).

Qualitatively, the method preserves sharp edges and maintains high color accuracy in smooth regions, such as clear skies, where previous greedy or neural-network-based approaches often struggle with artifacts or blurring.

Conclusion and Future Directions

This work demonstrates that high-quality inpainting-based data optimization is feasible at 4K resolutions within a sub-second timeframe. By leveraging GPU-centric algorithms like JFA and RAS solvers, the authors have removed the primary bottleneck in the inpainting-based compression pipeline.

Future research will focus on extending these parallel strategies to nonlinear diffusion operators, which can offer even higher reconstruction quality at the cost of increased complexity. Additionally, the authors suggest that integrating quantization—the conversion of continuous pixel values into discrete integers—directly into the optimization loop is a promising next step for developing a fully realized compression codec.

Summary updated

BibTeX
@article{kamper2025efficient,
  author = {Niklas Kämper and Vassillen Chizhov and Joachim Weickert},
  title = {{Efficient Parallel Algorithms for Inpainting-Based Representations of 4K Images - Part II: Spatial and Tonal Data Optimization}},
  journal = {SIAM J. Imaging Sci.},
  year = {2025},
  doi = {10.1137/23m1623975},
}
Figure