百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

sgm

> 编程语言
开源

GPU 上的半全局匹配

395 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

GPU 上的半全局匹配

Semi-Global Matching on the GPU

This is the implementation of Embedded real-time stereo estimation via Semi-Global Matching on the GPU, D. Hernandez-Juarez et al, ICCS 2016.

Performance obtained measured in Frames Per Second (FPS):

2 paths 4 paths 8 paths
NVIDIA Tegra X1 81 42 19
NVIDIA Titan X 886 475 237

Results for example image (left and right Images):

Results for example image (Output):

Parameters used for KITTI 2015:

  • 2 path directions: P1=7, P2=84
  • 4 path directions: P1=7, P2=86
  • 8 path directions: P1=6, P2=96

How to compile and test

Simply use CMake and target the output directory as "build". In command line this would be (from the project root folder):

bash
mkdir build
cd build
cmake ..
make

Note: if this doesn't work for you, please modify CMakeLists.txt for your CUDA architecture! Example: for RTX 3080 add "-gencode=arch=compute_86,code=sm_86"

How to use it

Type: ./sgm dir p1 p2

The arguments p1 and p2 are semi-global matching parameters, for more information read the SGM paper.

dir is the name of the directory which needs this format:

dir
---- left (images taken from the left camera)
---- right (right camera)
---- disparities (results will be here)

Related Publications

Embedded real-time stereo estimation via Semi-Global Matching on the GPU D. Hernandez-Juarez, A. Chacón, A. Espinosa, D. Vázquez, J. C. Moure, and A. M. López ICCS2016 – International Conference on Computational Science 2016

Requirements

  • OpenCV
  • CUDA
  • CMake

Limitations

  • Maximum disparity has to be 128
  • PATH_AGGREGATION parameter must be set to 4 or 8
  • Image width and height must be a divisible by 4

Troubleshooting

  • Very fast execution and black disparity result: This is usually an error related to the compute architecture used. Look at the CMakeLists.txt and change the architecture to the one you are using, please. If you run the application with nvprof you will see that it does not run any CUDA kernel.

What to cite

If you use this code for your research, please kindly cite:

…

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言