RoFIR: Robust Fisheye Image Rectification Framework Impervious to Optical Center Deviation

Zhaokang Liao, Hao Feng, Shaokai Liu, Wengang Zhou, Houqiang LiarXiv 2024 · DOI

Introduction

Fisheye lenses are widely utilized in surveillance, robotics, and autonomous driving due to their ultra-wide field of view (FoV). However, this expansive perspective comes at the cost of significant radial distortion. While deep learning has advanced the field of fisheye image rectification, most existing methods rely on a "central fisheye" assumption—the belief that the optical center (the point of zero distortion) aligns perfectly with the geometric center of the image.

In real-world scenarios, this assumption frequently fails. Asymmetric cropping, lens misalignment, or sensor shifts can move the optical center away from the middle of the frame, breaking the global radial symmetry that standard models depend on. This paper introduces RoFIR (Robust Fisheye Image Rectification), a framework designed to handle these "deviated" fisheye images by shifting the focus from global patterns to local distortion perception.

The Challenge of Deviated Optical Centers

Traditional rectification models often fail when presented with images where the optical center is shifted. Because these models are trained to expect symmetry around the image center, they produce warped, wavy, or tilted results when the actual distortion pattern is off-center.

Figure 1: Illustration of a deviated fisheye image where the optical center (blue dot) is shifted away from the geometric center (intersection of dashed lines).

When the optical center deviates, the global geometric priors used by previous state-of-the-art (SOTA) methods become liabilities rather than assets. RoFIR addresses this by prioritizing local geometric features over global assumptions.

Methodology: Perceiving Local Distortion

The core innovation of RoFIR is the Distortion Vector Map (DVM). Instead of attempting to calculate global camera parameters or a direct image-to-image translation, the model learns to perceive distortion as a pixel-wise local property.

1. Distortion Vector Map (DVM)

The DVM (or $V$ map) assigns a 2D vector to every pixel. The magnitude of this vector represents the intensity of local distortion, while its direction points toward the true optical center. Because the DVM is defined locally, it remains accurate regardless of where the optical center is located within the frame.

Figure 5: Examples of distorted images alongside their corresponding predicted Distortion Vector Maps (DVM). The color coding represents the direction and magnitude of local distortion.

2. Two-Stage Training Paradigm

RoFIR utilizes a Vision Transformer (ViT) architecture trained in two distinct stages:

  • Stage I (Pre-training): The encoder is trained on a pretext task to regress the DVM from a distorted image. This instills a strong "geometric inductive bias," teaching the model to understand the underlying physics of the lens distortion.
  • Stage II (Fine-tuning): The pre-trained encoder is paired with a decoder to predict a backward flow map. This map defines the coordinate transformation required to move pixels from the distorted source to their correct positions in a rectified target image, avoiding the "cracks" or artifacts common in forward-flow methods.

Experimental Results

RoFIR demonstrates superior robustness compared to existing methods, particularly when handling deviated images.

  • Quantitative Performance: On deviated fisheye datasets, RoFIR achieved a Structural Similarity Index (SSIM) of 0.9054 and a Peak Signal-to-Noise Ratio (PSNR) of 24.39. In contrast, previous SOTA methods like DaFIR saw their SSIM drop significantly to 0.5835 under the same deviated conditions.
  • Qualitative Superiority: In real-world testing involving off-center crops, RoFIR was uniquely capable of maintaining straight lines and natural proportions. While other models produced distorted, "wavy" structures by trying to force central symmetry, RoFIR correctly identified the local distortion flow to produce a clean rectification.

Conclusion

RoFIR represents a significant step forward in making fisheye rectification practical for real-world applications where ideal "central" conditions are rare. By leveraging the Distortion Vector Map as a local geometric prior, the framework achieves state-of-the-art results that are impervious to optical center deviation. Future work may explore extending this local perception approach to other complex geometric tasks, such as document unwarping or wide-angle portrait correction.

Summary updated

BibTeX
@misc{liao2024rofir,
  author = {Zhaokang Liao and Hao Feng and Shaokai Liu and Wengang Zhou and Houqiang Li},
  title = {{RoFIR: Robust Fisheye Image Rectification Framework Impervious to Optical Center Deviation}},
  year = {2024},
  eprint = {2406.18927},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.18927},
}
Figure