Image Stitching Based on Planar Region Consensus

Aocheng Li, Jie Guo, Yanwen Guo · DOI

Abstract

Image stitching for two images without a global transformation between them is notoriously difficult. In this paper, noticing the importance of planar structure under perspective geometry, we propose a new image stitching method which stitches images by allowing for the alignment of a set of matched dominant planar regions. Clearly different from previous methods resorting to plane segmentation, the key to our approach is to utilize rich semantic information directly from RGB images to extract planar image regions with a deep Convolutional Neural Network (CNN). We specifically design a new module to make fully use of existing semantic segmentation networks to accommodate planar segmentation. To train the network, a dataset for planar region segmentation is contributed. With the planar region knowledge, a set of local transformations can be obtained by constraining matched regions, enabling more precise alignment in the overlapping area. We also use planar knowledge to estimate a transformation field over the whole image. The final mosaic is obtained by a mesh-based optimization framework which maintains high alignment accuracy and relaxes similarity transformation at the same time. Extensive experiments with quantitative comparisons show that our method can deal with different situations and outperforms the state-of-the-arts on challenging scenes.

Introduction

Image stitching aims to combine multiple photographs into a single wide-angle panorama. A primary challenge in this field is parallax, which occurs when objects at varying distances shift relative to one another as the camera moves. Traditional methods often rely on a single global homography, which is only effective for perfectly planar scenes or pure camera rotation. While modern spatially-varying methods attempt to warp images locally, they frequently rely on low-level features that can be noisy, leading to visual artifacts like ghosting, misaligned edges, or structural distortions.

Methodology

The proposed Planar Region Consensus Stitching (PRCS) framework incorporates semantic scene understanding to improve geometric alignment beyond simple point-matching.

Planar Region Segmentation

The core of the approach is identifying "planar regions"—groups of pixels belonging to the same physical plane. The authors adapt the UPerNet architecture, adding a custom clustering loss layer. Unlike standard segmentation that requires fixed labels (e.g., "wall"), this layer uses a maximum weighted matching algorithm during backpropagation. This enables the network to group pixels geometrically, identifying consistent planes even when specific semantic labels vary between images.

Planar region segmentation mask generated by the adapted CNN, identifying dominant geometric planes in the scene.

Regional RANSAC and Optimization

Instead of a global search, the algorithm performs "Regional RANSAC" to match keypoints within identified planar regions. This ensures that transformations for specific surfaces (like a building facade) are calculated using relevant points, increasing robustness against outliers.

The final mosaic is generated via a 100x100 mesh warping process, optimized by a four-part objective function:

  • Alignment Term: Ensures overlap of matched points from Regional RANSAC.
  • Regional Similarity Term: Maintains transformation consistency within detected planes to prevent internal distortion.
  • Local Similarity Term: Preserves mesh smoothness and overall shape.
  • Line Preserving Term: Protects straight-line structures from being bent during the warp.

Evaluation and Results

The authors contributed a new Planar Region Dataset by manually relabeling 1,005 images from the ADE20k dataset to provide ground truth for planar segmentation. Performance was evaluated on 20 challenging image pairs using the RMSE-NCC (Root Mean Square Error of Normalized Cross Correlation) metric.

PRCS achieved a superior average error of 7.097, outperforming state-of-the-art methods such as NISwGSP (7.408), APAP, and SPHP. Qualitatively, PRCS excels in maintaining structural integrity in complex scenes with foreground/background depth, where other methods often produce "bending" artifacts.

Stitching result using the proposed PRCS method, demonstrating precise alignment and preservation of straight lines in the crosswalk area.

Conclusion

By leveraging deep learning for semantic planar segmentation, PRCS provides a robust solution to the parallax problem in image stitching. The method ensures that local transformations respect the underlying geometry of the scene, resulting in panoramas with significantly fewer visual artifacts. While the method depends on the quality of initial segmentation and feature-rich areas, it sets a new benchmark for high-accuracy alignment in challenging environments.

Summary updated

BibTeX
@article{li2021image,
  author = {Aocheng Li and Jie Guo and Yanwen Guo},
  title = {{Image Stitching Based on Planar Region Consensus}},
  journal = {IEEE Trans. Image Process.},
  year = {2021},
  url = {https://openreview.net/forum?id=xCMx2F8hZCJ},
}
Figure