Skip to content

june65/StereoMatching-Pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stereo Matching PRO python

Dive into the world of computer vision with this comprehensive Python project that brings stereo matching to life. Designed for enthusiasts and professionals alike, this project leverages cutting-edge algorithms to generate precise depth maps from stereo image pairs. Whether you're exploring autonomous systems, 3D reconstruction, or just expanding your knowledge, this project offers a hands-on approach to mastering stereo vision.

teaser

Table of Contents

Environment setup

This code was tested with Python 3.8.3.

Installation

git clone https://github.com/june65/StereoMatchingPro
pip install -r requirements.txt

Data

Middlebury Computer Vision Pages provide datasets and benchmarks for computer vision research, including stereo vision, optical flow, and multi-view stereo. Download datasets at link here.

Running

We demonstrate the precision of our stereo matching algorithms using the benchmark Tsukuba dataset.

Ground Truth

Image 1

Absolute intensity difference

python main.py --costmethod AD --rgbexpand True

RMSE Bad Ratio

Image 1 Image 2

Squared intensity difference

python main.py --costmethod SD --rgbexpand True

RMSE Bad Ratio

Image 1 Image 2

Sum of absolute differences

python main.py --costmethod SAD --costwindow 3
Image 1 Image 2
python test.py --costmethod SAD --costwindow 33

RMSE Bad Ratio

Image 1

Sum of squared differences

python main.py --costmethod SSD --costwindow 3
Image 1 Image 2
python test.py --costmethod SSD --costwindow 33

RMSE Bad Ratio

Image 1

Adaptive Support Weights

python main.py --costmethod ASW --costwindow 33
Image 1 Image 2
python test.py --costmethod ASW --costwindow 51

RMSE Bad Ratio

Image 1

Semi-Global Matching

python main.py --costmethod SGM
Image 1

Graph Cut

python main.py --costmethod AD --graphcut True

RMSE Bad Ratio

Image 1

Left Right Consistency Check

python main.py --costmethod SAD --costwindow 3 --lrcheck True
Image 1

Tree Filtering

python main.py --costmethod ASW --costwindow 27 --treefilter True --lrcheck True

RMSE Bad Ratio

Image 1 Image 1

Weighted Median Filter

python main.py --costmethod ASW --costwindow 33 --midfilter 5

RMSE Bad Ratio

Image 1

Best Result

ASW + Left Right Consistency Check + Tree Filtering + Weighted Median Filter

python main.py --costmethod ASW --costwindow 33 --lrcheck True --treefilter True --midfilter 5 

RMSE Bad Ratio

Image 1

Reference

Stereo Matching With Fusing Adaptive Support Weights

Stereo Processing by Semi-Global Matching and Mutual Information

Stereo Matching Using Tree Filtering

Constant Time Weighted Median Filtering for Stereo Matching