Abstract
Exemplar-based algorithms are a popular technique for image inpainting, primarily involving two phases: determining the filling order and selecting suitable exemplars. Traditional methods often suffer from improper exemplar selection, leading to structural artifacts. This paper introduces an independent strategy that separates geometry propagation from texture synthesis. By defining a new separated priority definition and an automatic step-estimation algorithm, the proposed method effectively recovers image geometry and textures with improved computational efficiency.
Introduction
Image inpainting is the process of reconstructing missing or damaged parts of an image to restore its visual integrity. Common applications include removing unwanted objects or repairing old photographs. Historically, two main approaches have dominated the field: Partial Differential Equation (PDE)-based methods and exemplar-based methods. While PDE-based methods excel at connecting geometric lines, they often produce blurry results. Conversely, exemplar-based methods, such as the classic algorithm by Criminisi et al., are effective for texture synthesis but frequently fail to maintain structural continuity.
The primary challenge in traditional exemplar-based inpainting lies in the priority function, which typically multiplies a confidence term (representing known local information) by a data term (representing structural strength). These terms often conflict; as the confidence term decays in large missing regions, the algorithm loses its focus on geometry, resulting in "miscopies" and broken edges.
Methodology
To address the limitations of combined priority functions, this research proposes a "divide and conquer" strategy that prioritizes geometry before texture.
Separated Priority Definition
The algorithm operates in two distinct phases:
- Phase 1 (Geometry Propagation): The priority is determined solely by the data term ($D(p)$). This phase focuses on extending edges and structures into the missing region $\Omega$ until the "skeleton" of the image is restored.
- Phase 2 (Texture Synthesis): Once the geometric framework is established, the algorithm switches to using the confidence term ($C(p)$) to fill the remaining gaps with appropriate textures.
Automatic Step Estimation
A critical innovation is the automatic determination of when to switch from Phase 1 to Phase 2. The authors observed that the density of "structure pixels" (edges) in a missing region is generally proportional to the density in the known source region. By applying a Canny edge detector to the source region $\Phi$, the algorithm estimates the total number of steps required for geometric propagation.
Patch-in-Patch Strategy
To enhance speed, the method employs a local search window rather than searching the entire image for matching exemplars. This "patch-in-patch" approach significantly reduces the search space, assuming that the most visually coherent matches are likely located near the target patch.
Experimental Results
The method was evaluated using the im2gps dataset for structural assumptions and various test images like "Zebra," "Windmill," and "Curveball" for performance.
- Visual Fidelity: The proposed method successfully reconstructed both straight lines and complex curves where traditional methods and commercial tools like Photoshop’s "Content-Aware Fill" produced artifacts.
- Computational Efficiency: The local search and separated priority led to dramatic speedups. For instance, in a "Plane" test image, processing time dropped from 30.96 seconds (traditional) to 5.72 seconds.
- Robustness: By decoupling the confidence term from the initial geometric phase, the algorithm remains stable even when filling very large holes where traditional confidence values would normally drop to zero.
Conclusion and Future Work
By separating geometry from texture, this approach provides a more robust framework for exemplar-based inpainting. While highly effective for linear and curved structures, the method faces challenges with sharp corners and complex junctions where multiple lines intersect. Future research may focus on improving directional sensitivity and refining edge detection dependencies to handle more intricate geometric intersections.
Summary updated