Stereo by Two-Level Dynamic Programming

Yuichi Ohta, Takeo Kanade

Introduction

In the field of stereo vision, the fundamental challenge lies in establishing correspondences between two images to compute depth through triangulation. Traditionally, when images are rectified, this search is treated as a series of independent 1D problems—matching rows in the left image to rows in the right image, known as intra-scanline search. However, this approach often fails to capture the vertical structural consistency inherent in real-world objects, leading to "streaking" or jagged artifacts in depth maps. Ohta and Kanade's 1985 paper introduced a landmark solution: a two-level dynamic programming (DP) algorithm that enforces inter-scanline consistency.

Methodology: A Hierarchical Approach

The proposed algorithm operates on two distinct levels to optimize matching both within and across scanlines. By treating connected vertical edges as structural constraints, the authors significantly reduce noise in depth maps, particularly in complex urban environments.

The two-level dynamic programming hierarchy showing the interaction between intra-scanline interval matching and inter-scanline edge matching.

At the lower level, the algorithm matches edge-delimited intervals rather than individual pixels. By focusing on segments between detected edges, the search becomes more robust to noise. The cost of matching these intervals is calculated based on the similarity of pixel intensity mean and variance. This treats the matching of two scanlines as a path-finding problem on a 2D plane.

The higher level of the hierarchy treats the stack of 2D search planes as a 3D volume. The goal is to find an optimal "matching surface" through this space. The key innovation is the use of vertically connected edges as structural anchors. When an edge is detected across multiple rows in both images, it serves as a constraint to link the DP paths of adjacent scanlines.

Visualization of the 3D search space where 2D search planes are stacked and connected edges form constraints across rows.

Key Insights: Balancing Consistency and Complexity

A significant challenge in 3D stereo matching is maintaining the Markovian property required for efficient DP. A strict vertical constraint would make the problem computationally intractable. Ohta and Kanade solved this by introducing "weaker" consistency rules. These rules penalize vertical discontinuities without making the search space impossible to navigate, allowing the algorithm to maintain optimality while ensuring structural alignment.

Furthermore, the algorithm is designed to degrade gracefully. In regions lacking long connected edges, such as highly textured foliage, the system naturally reverts to standard 2D DP, ensuring versatility across diverse environments.

Experimental Results

The algorithm was primarily evaluated using high-resolution aerial photographs of the "White House" scene in Washington, D.C. (388x388 pixels). The results demonstrated a dramatic improvement over standard 1D DP:

  • Consistency Violations: The standard 2D search produced 436 instances of vertical consistency violations. The two-level 3D approach reduced this number to just 32.
  • Visual Quality: Disparity maps generated by the 3D method showed significantly cleaner and sharper boundaries around buildings, preserving the linear structures of urban architecture that were previously lost to noise.

Conclusion and Limitations

While Ohta and Kanade's approach represented a major leap forward, it remains dependent on the quality of initial edge detection. If edges are not correctly linked across rows, the inter-scanline constraints cannot be effectively applied. Additionally, while the "weaker" rules enable efficiency, they do not guarantee 100% consistency. Despite these limitations, the conceptualization of stereo matching as a surface discovery problem in a 3D volume remains a foundational principle in computer vision.

Summary updated

BibTeX
@inproceedings{ohta1985stereo,
  author = {Yuichi Ohta and Takeo Kanade},
  title = {{Stereo by Two-Level Dynamic Programming}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1985},
}
Figure