As previously discussed regarding recent image completion algorithms, the challenge lies in addressing blurriness and artifacts when restoring missing regions. Despite extensive efforts to train deep learning models on various datasets, which are known for their reliability, achieving optimal outcomes remains an ongoing challenge. There is a need for more effective methods to overcome existing limitations, particularly in reducing color discrepancies and speeding up the completion process. In this context, traditional inpainting methods, often overlooked by some researchers, emerge as potential enhancements to completion techniques. They offer a quick and straightforward approach, aligning with the proposed method in this paper. Our method is designed to restore arbitrary missing regions in damaged art paintings. The Weighted Similarity-Confidence Laplacian Synthesis systematically addresses missing regions by considering important components of art paintings in high resolution. The Multi-Region Completion combines the Weighted Laplacian synthesis and patch-based propagation into a unified framework, creating authentic paintings that align with the artist’s original intent. This section explains the key aspects of our approach, focusing on Weighted Similarity-Confidence Laplacian Synthesis.
3.1. Weighted Similarity-Confidence Laplacian Synthesis
Addressing a missing region characterized by complicated structures and textures, as commonly encountered in damaged art paintings, presents a formidable challenge in the realm of image completion. Numerous recent research endeavors have endeavored to tackle this complicated issue [
33,
34]. However, the persistent issues of blurriness and color discrepancies have proven to be substantial impediments. Moreover, when the missing region lies arbitrarily within the boundary of objects, it intensifies the challenge, leading to the generation of unsatisfactory results marked by significant color divergences, especially in the context of complex structures and textures at high resolutions. In response to these challenges, our proposed approach advocates a proficient problem-solving strategy, involving a consistent collaboration on multi-regions of weighted Laplacian synthesis and patch-based completion.
The detailed explanation of our approach is depicted in
Figure 1. Commencing the process, we utilize a high-resolution painting with a size of around 1600×2136 pixels, denoted as
in
Figure 1(a), featuring damaged holes. Subsequently, we perform segmentation on
and its corresponding mask images,
, dividing them into 16 multi-regions through the separation of pixels into distinct patches (
Figure 1(b)). Each region encompasses approximately 400×400 pixels, resembling the standard size of compressed images but exhibiting more homogeneity in pixels. This approach facilitates a more specific and precise completion of the missing regions within the local area.
Initially, the exploitation of a Laplacian pyramid completion technique proves effective for high-resolution paintings, utilizing the abundance of pixels to make consistent completion decisions across various resolutions. Inspired by Lee et al. [
35], we integrate Laplacian
and upsampled Gaussian
pyramids to progressively enhance completion quality from the coarsest to the finest layer, as exemplified in
Figure 1(c). Furthermore, to address the challenge of structure diffusion involving the segmentation of a non-homogeneous missing region along the object boundary into smaller, homogeneous regions, we employ texture synthesis. This process aims to generate a high-quality surface with similar intensities through the estimation of the Laplacian of a Gaussian (LoG). According to [
35], the computation of LoG is costly due to its complicated function. However, the Laplacian of a Gaussian operates similarly to the Difference of Gaussian (DoG), which is integral for considering edge structures in the convolution process. Consequently, our choice is to apply the Laplacian of a Gaussian pyramid at different levels, ensuring consistent performance in edge awareness and base textures with more manageable computations. In the texture synthesis process, the initial step entails constructing a Gaussian pyramid
to extract pixel intensities at each level for analyzing the base structure. Following this, the construction establishes the Laplacian pyramid to enhance edge awareness:
Where
i is the current level of pyramid.
represents a downsampled Gaussian of
, while
denotes an upsampled Gaussian of
.
is then transformed into a Laplacian image using
and
as a basis, following the approach outlined in [
35].
Following the construction of Laplacian and Gaussian pyramids, the next step involves identifying matching patches at each level. This is accomplished by improving a nearest neighbor search algorithm that approximates the most similar areas between the source
S and target
T, denoted as
. The basis for this approximation relies on the minimum normalized distance. In the subsequent phase, the algorithm refines the search for the most similar patches between the
S and
T at different levels. This process aims to achieve a more accurate matching of areas, ensuring a robust foundation for subsequent completion efforts:
Where and represent patches of the and pyramids at level i and location S, while and exhibit patches of the and pyramids at level i and location T. The variable D represents a maximum distance metric between two pixels, p and q.
The pursuit of determining the optimal pixel value for completing a missing region was a critical aspect influencing the overall performance of image completion. The approach proposed by Lee et al. [
35] involved a weighted blending of scales between the upsampled Gaussian
and Laplacian image
, aiming to establish the most effective similarity between the target and source areas. However, this method introduced a voting system sensitive to detecting similarity, assuming that all pixels located outside the current target area at the given level would be considered. Unfortunately, this could lead to challenges, as the current target region might not have been fully propagated from the nearest neighbor of the most recently restored area, resulting in a color discrepancy that failed to blend seamlessly with adjacent patches. In response to this challenge, our method innovates the voting similarity function, enhancing its capabilities by considering the potential overlap of nearest neighbor pixels in color, even across different levels. This improvement is achieved by incorporating the advanced weighted average vote
, which not only provides a measure of similarity but also introduces a confidence weight, denoted as
. This combined approach leads to a more refined and accurate estimation of optimal pixel values:
Where
and
are instrumental in characterizing the similarity and distance between the source pixel
p and target pixel
q at level
i.
is a nearest neighbor search algorithm based on Equation
2. Additionally,
serves as a determinant of the sensitivity for detecting similarity. Further refining the process,
introduces a confidence weight at target pixel
q, strategically designed to alleviate boundary errors. This confidence weight assigns a higher value to target points closer to the completion boundary, ensuring more robust performance. The culmination of these factors is encapsulated in the weight
at the target pixel
q. Moreover, the variable
denotes the overlapping colors from its nearest neighbor field, while
Q represents the total number of
. These components contribute to a comprehensive assessment of similarity and confidence, laying the foundation for precise and accurate weighting at the target pixel level.
Algorithm 1:Weighted Similarity-Confidence Laplacian Synthesis |
|
Completing high-resolution paintings that encompass complicated structures and textures can introduce errors, particularly in the form of ambiguity within the restored pixels. This ambiguity may manifest as color discrepancies and blurriness in the final restored image. To address this challenge, we seamlessly integrate patch-based propagation, employing a locally applied isophote-driven technique to synthesize the complicated details of art painting elements (
Figure 1(d)). The core principle involves ensuring that the matched patches
align along the boundary of a hole situated between two distinct colored regions. The optimal-matched patch from the source area is then replicated into the target area, taking into account both the confidence
and data terms
. The highest priority is accorded to the best match
[
1].
Where represents the current patch, while delineates the pixel region of . The unit vector orthogonal to point s is denoted as , with the operator ⊥ signifying the perpendicular operation. The normalization factor, , is set to a value of 255. The propagation unfolds systematically, guided by the priority across every pixel along the unknown boundary border, employing a clockwise filling approach.
In the quest for optimal patches, we employ a fused approach that integrates the outcomes of Weighted Laplacian Synthesis and Patch-based Propagation through Pyramid blending [
36]. Pyramid blending distinguishes itself among blending methods for its capacity to effectively handle scale differences between images, operating at multiple scales and considering both coarse and fine details. This characteristic ensures a comprehensive blending process that results in smoother transitions between images (
Figure 1(e)(f)). The efficacy of pyramid blending extends to its proficiency in managing abrupt changes or discontinuities within images. The hierarchical structure of pyramids facilitates a seamless transition across different levels, preventing artifacts or noticeable seams in the blended result. This proves advantageous, particularly when merging images with diverse content or structures. Moreover, pyramid blending demonstrates computational efficiency. By operating at various levels of resolution, the algorithm can focus on essential details without imposing excessive computational demands, making it suitable for real-time applications or large-scale image blending tasks.
3.2. Our Proposed Algorithm
In addressing the challenging task of completing missing regions in damaged art paintings, our proposed approach stands out as a proficient problem-solving strategy. The method seamlessly integrates weighted Laplacian synthesis and patch-based completion, collaborating consistently across multi-regions. Illustrated in
Figure 1(a), the process begins with the utilization of a high-resolution painting, denoted as
. Through segmentation of
and its corresponding mask images
(
Figure 1(b)), our approach ensures a more precise and specific completion of missing regions within the local area.
The exploitation of Laplacian pyramid completion proves effective for high-resolution paintings, employing the abundance of pixels for consistent completion decisions across various resolutions. Inspired by Lee et al. [
35], Laplacian and upsampled Gaussian pyramids are combined, progressively enhancing completion quality from the coarsest to the finest layer. To address structure diffusion challenges, texture synthesis is introduced, employing Laplacian of a Gaussian pyramid at different levels. The process involves constructing a Gaussian pyramid to analyze base structure intensities and subsequently establishing a Laplacian pyramid for enhanced edge awareness (
Figure 1(c)). Matching patches at different levels is achieved through an improved nearest neighbor search algorithm, ensuring a more accurate matching of areas for robust completion. The pursuit of determining the optimal pixel value for completing a missing region involves innovating the voting similarity function. Our method enhances this function by considering potential overlap of nearest neighbor pixels in color, even across different levels, resulting in a refined and accurate estimation of optimal pixel values.
To address errors introduced by ambiguity in restored pixels, patch-based propagation is seamlessly integrated, applying an isophote-driven technique locally (
Figure 1(d)). The propagation process ensures that matched patches align along the boundary of a hole between two distinct colored regions, with the best-matched patch duplicated into the target area based on confidence and data terms.
In the quest for optimal patches, our approach employs a fused reaction that integrates the outcomes of weighted Laplacian synthesis and patch-based propagation through Pyramid blending (
Figure 1(e)(f)). Pyramid blending emerges as a standout blending method, effectively handling scale differences between images and ensuring smoother transitions. Its hierarchical structure prevents noticeable seams in blended results, particularly advantageous when merging images with diverse content or structures. The computational efficiency of pyramid blending makes it suitable for real-time applications or large-scale image blending tasks.
The proposed algorithm 1 guides the entire process, beginning with segmentation and progressing through weighted Laplacian synthesis, patch-based propagation, and Pyramid blending until multi-regions are empty. This comprehensive approach, applied to a high-resolution art painting with missing regions sized 1600×2136 pixels, results in the completion of visually pleasing and artifact-free art paintings.