Abstract
The conversion of traditional 2D film into stereo 3D has become a critical industry challenge. A major bottleneck in this process is disocclusion inpainting, where areas hidden behind foreground objects must be filled after shifting camera perspectives. Current algorithms are often either too slow for interactive use or lack intuitive controls for artists. This paper presents Guidefill, a fast, GPU-accelerated inpainting algorithm based on transporting image information along automatically detected or artist-edited splines. By implementing a novel "ghost pixel" technique to eliminate grid-based artifacts and a parallel boundary-tracking algorithm for efficiency, Guidefill achieves interactive speeds on high-resolution footage while providing artists with the necessary tools to ensure geometric accuracy.
Introduction: The Disocclusion Challenge
When converting 2D footage to 3D, artists "re-project" the original image from a new virtual camera angle. This shift inevitably creates "cracks" or holes in the image—regions that were occluded in the original view but are now visible. Filling these holes, known as disocclusion inpainting, is a labor-intensive task in commercial 3D conversion.
Existing solutions generally fall into two categories: exemplar-based methods and geometric methods. Exemplar-based methods produce high-quality textures but are computationally expensive and difficult to control. Geometric methods are faster but suffer from "kinking"—a phenomenon where straight lines unnaturally bend or snap to the pixel grid at the boundary of the hole. Guidefill bridges this gap by offering a geometric approach that is both fast enough for real-time feedback and controllable enough for high-end visual effects.
The Guidefill Methodology
Guidefill is a shell-based geometric inpainting algorithm that fills holes from the outside in, layer by layer. The process begins with a 3D proxy of the scene to identify occlusion regions and the inpainting domain.
Artist-Guided Transport and the "Ghost Pixel" Technique
The core innovation of Guidefill is the use of a "guide field" derived from Bézier splines. Artists can draw or edit these splines to dictate the direction in which image structures should propagate. This ensures that critical lines, such as the edge of a table or a wall, are extended correctly into the disoccluded area.
To solve the "kinking" problem, Guidefill introduces "ghost pixels." Standard discrete algorithms are biased toward axis-aligned directions (horizontal/vertical). Guidefill breaks this bias by using a rotated neighborhood, sampling "ghost pixels" via bilinear interpolation at coordinates that align with the desired transport direction. This effectively simulates a continuous domain, allowing lines to propagate at any angle without bending.
GPU Acceleration and Boundary Tracking
To maintain interactive speeds, Guidefill is implemented on the GPU. The authors propose a parallel algorithm to track the inpainting interface as it evolves. By focusing GPU resources only on the active boundary of the hole, the algorithm avoids wasting cycles on empty space or already-filled pixels. This optimization moves the algorithm from $O(N \sqrt{N})$ to $O(\sqrt{N} \log N)$ complexity, enabling the tool to handle 4K and 5K resolutions with minimal lag.
Performance and Results
Guidefill demonstrates significant performance gains over traditional methods. For a massive 5000x5000px image, the algorithm completed in just 923ms, whereas competing variational methods often failed or ran out of memory. On an HD video sequence (101 frames), Guidefill inpainted the entire sequence in 19 seconds.
Qualitatively, the method successfully eliminates kinking and clipping artifacts. While the algorithm is "texture-blind" (it does not recreate complex patterns like floral wallpaper), its ability to maintain geometric structure and smooth gradients makes it highly effective for the thin inpainting domains typical of 3D conversion.
Conclusion
Guidefill provides a mathematically rigorous yet practically accessible tool for the visual effects industry. By prioritizing interactivity and artist control over complete automation, it addresses the real-world needs of 3D conversion pipelines. Future work may involve extending the method to include temporal coherence across frames and automating spline tracking to further reduce manual labor.
Summary updated