Skip to content

Stereo Matching using Dynamic Programming implemented in MATLAB and Python.

License

Notifications You must be signed in to change notification settings

bollasap/stereo-dynamic-programming

Repository files navigation

Stereo Matching using Dynamic Programming

Stereo Matching using Dynamic Programming implemented in MATLAB and Python.

Features

Stereo matching algorithms

  • Dynamic Programming (DP)

Two different versions of Dynamic Programming

  • DP with Left–Right Axes DSI
  • DP with Left–Disparity Axes DSI

The algorithms are implemented in both MATLAB and Python.

All algorithms are optimized for performance using matrix operations and other techniques.

Installation

Download the project as ZIP file, unzip it, and run the scripts.

Python Requirements

  • NumPy
  • Matplotlib
  • OpenCV (opencv-python)

Usage

The project contains MATLAB and Python scripts, each implementing a stereo matching algorithm. The files left.png and right.png contain the stereo image pair used as input. To use a different stereo pair, replace these two images with your own. In this case, you must also adjust the disparity levels parameter in the script you are running. You may optionally modify other parameters as needed. If the input images contain little or no noise, it is recommended not to use the Gaussian filter.

The results between MATLAB and Python implementation are similar.

Results

Below are the disparity maps produced from the Tsukuba stereo pair.

Tsukuba Stereo Image Tsukuba Stereo Image

Dynamic Programming (Left-Right)

Dynamic Programming (Left-Right) Disparity Map

Dynamic Programming (Left-Disparity)

Dynamic Programming (Left-Disparity) Disparity Map

Related Repositories

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Stereo Matching using Dynamic Programming implemented in MATLAB and Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published