Giter VIP home page Giter VIP logo

ethan-li-coding / patchmatchstereo Goto Github PK

View Code? Open in Web Editor NEW
683.0 18.0 121.0 3.94 MB

PatchMatchStereo,倾斜窗口经典,效果极佳,OpenMVS&Colmap稠密匹配算法。完整实现,代码规范,注释清晰,博客教学,欢迎star!

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

License: MIT License

C++ 98.85% C 1.15%
patchmatch stereo stereo-matching 3d-reconstruction patchmatchstereo stereo-vision depth-estimation patchmatch-stereo patch-match-stereo

patchmatchstereo's Introduction

PatchMatchStereo

PatchMatch,倾斜窗口经典,效果极佳,OpenMVS&Colmap稠密匹配算法。完整实现,代码规范,注释清晰,博客教学,欢迎star!

CSDN博客

如果你想了解更多代码讲解,下面的博客或许能帮到你:
【码上实战】【立体匹配系列】经典PatchMatch: (1)框架
【码上实战】【立体匹配系列】经典PatchMatch: (2)主类
【码上实战】【立体匹配系列】经典PatchMatch: (3)随机初始化
【码上实战】【立体匹配系列】经典PatchMatch: (4)代价计算
【码上实战】【立体匹配系列】经典PatchMatch: (5)迭代传播
【码上实战】【立体匹配系列】经典PatchMatch: (6)后处理

环境

windows10 / visual studio 2015&2019
代码基本没有使用系统api,你可以非常方便的移植到linux,可能需要做极少量的修改

强烈建议你使用release模式运行代码,强烈不建议使用debug模式运行代码

第三方库

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

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

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

为便于移植,算法是不依赖任何图像库的,只在算法实验部分调用opencv库读取和显示图像,也可替换成其他图像库

算法引导

算法框架图


代码框架图

备注

算法优点:效果好,内存占用低
算法缺点:效率低,速度比较慢,不建议跑大图,建议跑个小图看看效果(Release模式)。如果设置为前端平行窗口(PatchMatchStereo为倾斜窗口时效果最好),则速度会更快,如下:

pms_option.is_fource_fpw = true;

论文

Bleyer M, Rhemann C, Rother C. PatchMatch Stereo-Stereo Matching with Slanted Support Windows[C]. British Machine Vision Conference 2011. 2011.

Github图片不显示的解决办法

修改hosts

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

在文件末尾添加:

# GitHub Start
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

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.