The basic stereoscopic algorithms have many similarities to each other and can be considered, in a way, that each algorithm is an evolution of another. In this project we created simplified forms of some basic stereoscopic algorithms in MATLAB. The code has been adapted to show the improvement and evolution of an algorithm from the previous one.
Stereo matching algorithms:
- Block Matching
- Dynamic Programming
- Semi-Global Matching
- Belief Propagation (Sequential)
- Belief Propagation (Synchronous)
The algorithms are implemented in MATLAB.
The algorithms are optimized for performance using matrix operations and other techniques.
| Number | Name | Implementation |
|---|---|---|
| 1 | Block Matching | stereo1_BM.m |
| 2 | Dynamic Programming | stereo2_DP.m |
| 3 | Semi-Global Matching | stereo3_SGM.m |
| 4 | Belief Propagation (Sequential) | stereo4_BP1.m |
| 5 | Belief Propagation (Synchronous) | stereo5_BP2.m |
Download the project as ZIP file, unzip it, and run the scripts.
A stereo matching algorithm works with stereo image pairs to produce disparity maps.
This project contains 5 MATLAB 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.
Below are the disparity maps produced from the Tsukuba stereo pair.
This project is licensed under the MIT License. See the LICENSE file for details.






