minygd / SemiGlobalMatching

SGM双目立体匹配算法完整实现,代码规范,注释丰富且清晰,CSDN同步教学

Home Page:https://github.com/ethan-li-coding/SemiGlobalMatching

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SemiGlobalMatching

SemiGlobalMatching立体匹配算法,学习SGM C++实现的好资源

CSDN博客

手把手教你编写SGM双目立体匹配(基于C++,Github同步更新)(一)(框架与类设计)
手把手教你编写SGM双目立体匹配(基于C++,Github同步更新)(二)(代价计算)
手把手教你编写SGM双目立体匹配(基于C++,Github同步更新)(三)(代价聚合)
手把手教你编写SGM双目立体匹配(基于C++,Github同步更新)(四)(代价聚合2)
手把手教你编写SGM双目立体匹配(基于C++,Github同步更新)(五)(视差优化)
手把手教你编写SGM双目立体匹配(基于C++,Github同步更新)(六)(视差填充)

环境

windows10 / visual studio 2015&2019

第三方库

opencv310
百度网盘连接:https://pan.baidu.com/s/1_WD-KdPyDBazEIim7NU3jA
提取码:aab4

解压后放将名称为OpenCV的文件夹复制到到3rdparty文件夹下

若运行时提示缺少opencv_310(d).dll,则在OpenCV文件夹里找到对应的dll文件复制到程序exe所在的目录即可(Opencv\dll\opencv_310(d).dll),带d为debug库,不带d为release库。

只在实验部分调用opencv库读取和显示图像,也可替换成其他图像库

算法引导

SGM步骤图


SGM类设计图

实验

实验(1):只做从左到右聚合:


实验(2):只做从右到左聚合:

实验(3):只做从上到下聚合:

实验(4):只做从下到上聚合:

实验(5):从左上到右下聚合:

实验(6):从右下到左上聚合:

实验(7):从右上到左下聚合:

实验(8):从左下到右上聚合:

实验(9):4-路径全聚合:

实验(10):8-路径全聚合:

实验(12):一致性检查+中值滤波:

实验(13):视差填充:

Github图片不显示的解决办法

修改hosts

C:\Windows\System32\drivers\etc\hosts

在文件末尾添加:

# GitHub Start 
192.30.253.112    github.com 
192.30.253.119    gist.github.com
151.101.184.133    assets-cdn.github.com
151.101.184.133    raw.githubusercontent.com
151.101.184.133    gist.githubusercontent.com
151.101.184.133    cloud.githubusercontent.com
151.101.184.133    camo.githubusercontent.com
151.101.184.133    avatars0.githubusercontent.com
151.101.184.133    avatars1.githubusercontent.com
151.101.184.133    avatars2.githubusercontent.com
151.101.184.133    avatars3.githubusercontent.com
151.101.184.133    avatars4.githubusercontent.com
151.101.184.133    avatars5.githubusercontent.com
151.101.184.133    avatars6.githubusercontent.com
151.101.184.133    avatars7.githubusercontent.com
151.101.184.133    avatars8.githubusercontent.com
 
 # GitHub End

About

SGM双目立体匹配算法完整实现,代码规范,注释丰富且清晰,CSDN同步教学

https://github.com/ethan-li-coding/SemiGlobalMatching

License:MIT License


Languages

Language:C++ 99.1%Language:C 0.9%