Beyond Row Alignment: Virtual-Camera-Aware Online Stereo Rectification

Yizhao Peng, Rui Gong, Zaiwang Gu, Xudong Jiang, Jun ChengNeurIPS 2026

TL;DR

Stereo depth cameras rely on left and right images being perfectly aligned horizontally, an assumption that easily breaks due to real-world bumps, vibrations, and temperature shifts. While existing "online" fixes try to force image rows back into alignment, they often warp the rest of the image or break the math needed to calculate actual metric distance. VirtualRect solves this by estimating not just how to line up the pixels, but also the exact virtual camera needed to keep the resulting 3D depth perception geometrically consistent and distortion-free.

What Problem Does This Paper Address?

To perceive 3D depth using two cameras (stereo vision), algorithms match points between the left and right images. Searching the whole 2D image for a match is computationally brutal, so we calibrate and warp ("rectify") the images beforehand so that any 3D point appears on the exact same horizontal pixel row in both views. That turns a 2D search into a fast 1D horizontal scan.

In the lab, offline calibration handles this nicely. Out on a highway, however, vibrations, heat, and mechanical stress nudge cameras out of alignment, ruining depth estimation. Online stereo rectification fixes this on the fly.

Recent methods optimize purely for row alignment across a set of matched points. The catch? Many mathematical warps (homographies) can align sparse points on rows while quietly mangling the rest of the image—stretching objects, cropping out crucial road regions, or leaving giant blank borders. Worse, if you warp the images to fix alignment without updating the camera parameters (like focal length) that the downstream depth network uses to convert pixel shifts into meters, your depth math becomes internally inconsistent.

Methods

VirtualRect builds on a standard pipeline—using a pretrained semi-dense matcher (Efficient LoFTR) to find point correspondences and a RANSAC-based geometric solver—and upgrades it with three deployment-aware components:

Overview of the VirtualRect architecture
  • Image-Wide Homography-Behavior Supervision: Standard training only penalizes alignment errors where keypoint matches happen to exist, leaving textureless areas (like asphalt or sky) unsupervised and prone to wild warping. VirtualRect overlays a uniform anchor grid across the entire image during training, ensuring the predicted warp behaves sensibly everywhere, not just on easy-to-match corners.
  • Solver-Aware Observation Calibration: Even after RANSAC filters out obvious bad matches (outliers), remaining "inliers" aren't equally trustworthy—think repetitive lane markings or thin poles. A lightweight neural head predicts the geometric residual risk of each surviving match, down-weighting sketchy points during the final 5-step Levenberg–Marquardt optimization.
  • Metric-Consistent Virtual Stereo Deployment: Instead of stopping at warped images, a small MLP deployment head predicts a bounded, shared "virtual camera" ($K^*$) by adjusting focal scale and vertical principal point. This maximizes valid image area, minimizes distortion, and hands the exact same $K^*$ to the downstream depth calculator so image pixels and metric depth math stay locked in sync.

Datasets

No new datasets were introduced; the authors evaluated on four established benchmarks:

  • Carla-Flowguided: Synthetic driving scenes with exact ground-truth camera poses and depth.
  • Semi-Truck Highway: Real-world wide-baseline driving footage subject to genuine highway vibration and structural stress.
  • Perturbed SceneFlow: A synthetic dataset with known geometric perturbations used for clean pose diagnostics.
  • CARLA-Drift: A temporally continuous synthetic dataset (155,000 stereo pairs across 155 sequences) featuring gradual random-walk camera drift, used for zero-shot testing.

Key Insights and Ideas

  • Row alignment is necessary, not sufficient: Optimizing sparse vertical errors can trick you into thinking rectification succeeded while the actual resampled image fed to the stereo matcher is severely cropped or distorted.
  • Supervise the operator, not just the points: Constraining how the homography transforms an image-wide grid yielded the single biggest jump in geometric stability during ablations, proving that solvers need global spatial guardrails.
  • Rectification must output a camera, not just images: Ablations showed that applying a post-processing warp while using the old camera intrinsics actually makes depth error worse (jumping from 1.61m to 3.00m MAE). Pairing the warped images with the newly predicted virtual camera $K^*$ drops error to 1.50m—proving image formation and depth conversion are two halves of the same coin.
  • Frame-by-frame precision can beat temporal tracking: On CARLA-Drift, VirtualRect processed every frame independently (zero-shot, no memory) and still cut depth error in half compared to TESO, a baseline that explicitly tracks calibration state over time.

Key Results

Compared to the prior state-of-the-art online rectifier (RsCeR), VirtualRect improves alignment and substantially boosts off-the-shelf stereo depth networks:

  • Alignment Accuracy: Reduces dense vertical optical flow error by 17% on Carla-Flowguided (0.52 to 0.43 px) and 7% on Semi-Truck Highway (0.59 to 0.55 px).
  • Downstream Depth & Coverage: Across three distinct stereo matchers (Monster++, DLNR, HITNet) on Carla-Flowguided, VirtualRect lowers Mean Absolute Error (MAE) by 30–41% (e.g., from 1.66m down to 0.98m with Monster++). Valid disparity coverage across the frame jumps from ~91–92% to 97.5–98.5%.
  • Runtime: Runs in 106 ms per stereo pair on an NVIDIA A40 GPU (70 ms matching, 31 ms solver, and just 5 ms for the virtual-camera head).
Figure 2: Qualitative downstream stereo disparity comparison by different online rectification methods on Semi-Truck Highway and Carla-Flowguided. Colored panels are disparity maps; the rightmost reference uses offline-calibration rectification.

Limitations and Future Work

  • Known Intrinsics Assumption: VirtualRect assumes the initial internal parameters of the input cameras are known, and restricts its virtual camera adjustments to a bounded focal-scale and vertical shift.
  • Scarcity of High-Precision Real Benchmarks: Real-world datasets with exact, time-varying ground-truth calibration and depth under genuine mechanical drift are rare; Semi-Truck Highway lacks the measurement precision needed for a definitive real-world verdict.
  • Headroom in Camera Selection: An "oracle" experiment—picking the optimal virtual camera per stereo pair with hindsight—achieved noticeably lower error than the current learned head, signaling clear room to improve how the virtual camera is predicted.

Summary updated

Abstract

Stereo matchers estimate depth by comparing the left and right images from a stereo camera pair, but they assume that the two cameras are accurately calibrated and rectified. In real deployments, small physical shifts after calibration, caused by camera motion, mechanical drift, vibration, or installation changes, can break this assumption and degrade depth estimation. Online stereo rectification is therefore needed to correct the image pair during operation and recover a stereo geometry where standard stereo matching can work reliably. Recent online rectification methods mainly optimize row alignment, making the left and right views of the same scene point fall on the same image row. We show that this target, while necessary, is insufficient for deployable stereo depth estimation. A rectifier may make a small set of matched points look well row-aligned, but still distort the full images in ways that hurt stereo matching: useful image regions may be cut off, large blank areas may appear, objects may be stretched or squeezed, or image scale may change unevenly across the view. We propose VirtualRect, an online stereo rectification method designed for reliable real-world deployment. Rather than treating rectification as simply making the left and right image rows line up, this method estimates a rectified virtual stereo camera and combines image-wide supervision of image warp behavior. This makes the rectified images and the camera parameters come from the same geometry, so the images used for matching and the model used for depth computation remain consistent. Experiments on multiple datasets show that, compared with the prior state-of-the-art online rectifier, VirtualRect reduces vertical flow error by 17% on Carla-Flowguided and 7% on Semi-Truck Highway, and lowers depth MAE by 30–41% on Carla-Flowguided across three downstream stereo matchers.
BibTeX
@inproceedings{peng2026beyond,
  author = {Yizhao Peng and Rui Gong and ZAIWANG GU and Xudong Jiang and Jun Cheng},
  title = {{Beyond Row Alignment: Virtual-Camera-Aware Online Stereo Rectification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=bWCyY4WYr9},
}
Figure