Solving multiple square jigsaw puzzles with missing pieces

Genady Paikin, Ayellet TalCVPR 2015

Abstract

This paper presents a fast, fully automatic, and deterministic solver for square jigsaw puzzles. Unlike traditional solvers, this approach effectively handles real-world complexities such as missing pieces, unknown orientations, and the simultaneous assembly of multiple mixed puzzles. By employing a refined $L_1$ compatibility metric and a reliability-based initialization strategy, the algorithm achieves state-of-the-art accuracy while operating 60 to 120 times faster than previous genetic algorithm-based methods.

Introduction

Solving jigsaw puzzles is a computationally challenging (NP-complete) task with significant applications in fields like archaeology, biology, and image editing. While standard puzzles offer shape-based cues, square jigsaw puzzles rely entirely on color and texture continuity across boundaries. Most existing solvers operate under idealized conditions, assuming all pieces are present and belong to a single puzzle of known dimensions. This research addresses the more difficult "unconstrained" scenario where pieces may be missing, orientations are unknown, and pieces from multiple different puzzles are intermingled.

Methodology

The proposed solver is a greedy, deterministic algorithm built upon three technical pillars:

  1. Efficient Dissimilarity Metric: The authors utilize an $L_1$ norm to measure boundary compatibility. This approach is three times faster than complex $L_q^p$ norms and demonstrates greater robustness against large outliers that often mislead other solvers.
  2. Reliability-Based Compatibility: Inspired by the ratio test in SIFT feature matching, the algorithm evaluates a match based on how much better it is than the second-best alternative. This prevents confident errors in low-texture regions, such as clear skies, where many pieces might appear to fit reasonably well.
  3. Deterministic Initialization: Instead of multiple random restarts, the solver identifies a "distinctive" starting piece—one that maintains mutual "best buddy" relationships with its neighbors in all four directions.
  4. The Pool Placer: The algorithm maintains a pool of candidate pieces, iteratively placing the most reliable match. Because it does not enforce a rigid grid, it naturally accommodates "holes" created by missing pieces.

Key Results

The algorithm was evaluated on standard benchmarks (Cho et al., Pomeranz et al., and Sholomon et al.) and custom mixed-puzzle scenarios.

  • Speed: The solver is significantly faster than the previous state-of-the-art. A 10,375-piece puzzle with unknown orientation was solved in just 2 minutes, compared to over 25 hours for previous genetic algorithm approaches.
  • Accuracy and Robustness: It achieved a neighbor accuracy of 95.68% across standard datasets. In complex tests involving over 5,000 pieces from five different mixed puzzles, the system successfully reconstructed the individual images in 30 seconds.
  • Scale: The system demonstrated its scalability by handling a massive 22,755-piece puzzle with over 1,100 missing pieces while maintaining high reconstruction quality.
Reconstruction of multiple mixed puzzles with varying percentages of missing pieces.

Discussion and Conclusion

A central insight of this work is that a well-designed greedy approach can outperform complex genetic algorithms in both speed and accuracy. The "power of the second best"—using relative rather than absolute similarity—is crucial for resolving ambiguities in repetitive textures.

While highly effective, the algorithm still faces challenges with extremely smooth or noisy images where distinct gradients are absent. Future research may involve incorporating high-level semantic understanding to guide assembly in these low-texture regions. Overall, this deterministic framework provides a robust and efficient solution for the most demanding jigsaw reconstruction tasks.

Summary updated

BibTeX
@inproceedings{paikin2015solving,
  author = {Genady Paikin and Ayellet Tal},
  title = {{Solving multiple square jigsaw puzzles with missing pieces}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2015},
  doi = {10.1109/cvpr.2015.7299116},
}
Figure