Coder Social home page Coder Social logo

stereovision-bm-sgbm's Introduction

较为实用的第二版已经发布,branch下选择stereoMatch-0.2.0以查看

StereoVision-BM-SGBM

OpenCV 双目BM和SGBM算法

环境说明:

操作系统: Windows 10
编译器: MinGW-w64(GCC 8.1)
OpenCV版本: 4.1
CMake: 3.16
请根据自己的OpenCV安装目录更改CMakeLists.txtinclude_directories,link_directorieslink_libraries ,换成对应的目录和文件。
(由于是在windows上开发的,所以没有用pkg来寻找库)

运行方式:

rm -r build/*
cd build
cmake ..
make -j4
./main

根据平台不同,命令可能会有所不同,如在Windows下用MinGW-w64(Powershell):

rm -r build/*
cd build 
cmake .. -G "MinGW Makefiles"
mingw-make -j4
./main.exe

运行结果

运行图

  • 双目分辨率是1280*480,图中的分辨率有误,应该为每秒10帧左右
  • 最后运算完成后得到深度图时间在0.19~0.21秒之间,也即FPS大概为5
  • 降低分辨率可以提升运算速度

使用说明

本项目使用cvui界面进行参数调试:
cvui
cvui使用说明
调试过程中,按键盘S键可切换StereoBM和StereoSGBM算法

  • 按钮Save Parameter用以保存调试参数
  • 按钮Load Parameter用以从文件加载参数
  • 按钮Run Stereo Calibration暂时还没整合进来(项目是直接写入摄像头参数到变量中,没有生成yml文件)
  • 按钮Exit退出程序
  • 紫色变量是对生成的深度图质量好坏影响很大的变量
  • 终端默认生成的三维坐标是像素重点[320,240]对应的世界坐标

stereovision-bm-sgbm's People

Contributors

parker-int64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.