Giter VIP home page Giter VIP logo

ethan-li-coding / patchmatchstereo Goto Github PK

View Code? Open in Web Editor NEW
684.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 Issues

您好,感谢您的分享,关于运行时间我还是想问一下

我在 release x64的情况下,用vs2019跑的代码,系统配置是win10 i3 8G
跑的是middlebury的 Dolls ,分辨率只有 463*370 ,
但是目前跑了30多分钟了还是没有出结果,不知道是否有某些设置没有考虑到呢? 期待您的回答! 感谢!

补充:跑了四十多分钟出结果了 效果并不如所示那样。。 不知道是有什么问题嘛

关于算法速度问题解答

PatchMatch速度是比较慢的。确保你的运行环境是Release模式,若为Debug模式则会非常慢,对代码里带的示例数据,Release模式可以在几分钟至十几分钟跑出结果。
此外,如果你设置为前端平行窗口模式,则速度会加快很多,这样设置:
pms_option.is_fource_fpw = true

关于数值量化

还有一个问题,将视差值量化为0-255之间的灰度值的公式是什么?

openmvs和colmap里面的密集匹配算法异同

您好,
打扰了,又是从您的博客过来。不知您是否研究过这两个库里面的密集匹配算法,想请教一点问题。。最近我阅读了colmap密集匹配算法的文章,数学公式太多有些地方没怎么看明白,只知道colmap里面的方法view selection和depth estimation是通过EM迭代同时完成的,view selection考虑更为全面一些,等等。还想请教一下下面的问题:
(1)colmap里面的深度值是怎么传播的,如何理解里面的状态转移方程 ,能否对比openmvs里面的方法稍微讲解一下不同之处。
(2)colmap法线优化是生成了额外的超参然后计算谁是最优,相比openmvs里面使用的二分法,这种方法的优势和劣势是什么
(3)相比openmvs,colmap方法更为耗时,耗时主要是因为EM这个迭代过程需要反复进行吗?
国庆期间还发来问题,希望不会过分打扰到您。
谢谢~

to_another_view算法解释 ?

照李博原本的说法是这样算的
image

但代码却被改成了这样
image

原本的代码还能理解,但改过之后反倒不理解了,有高手能解惑吗?

关于运行

您好我想请问一下您这个项目如何在CLion上运行呀 谢谢

关于结果的测试

看了您的AD-Census以及PatchMatch这两个项目,想问下您有相关的测试代码嘛?因为我之前跑的是
https://github.com/WangHewei16/Stereo-Matching 这个项目中Tablecode中的测试Error_Non31这个测试代码,但是目前感觉有几个问题:1.想问下生成的这些各种各样的图片的对应关系,因为在
https://github.com/WangHewei16/Stereo-Matching
这个项目中,生成了许多的结果,比如result生成了许多注入dispLR,dispBoth这样的图片。
您生成的是视差图,和我生成的视差图在使用测试代码的时候结果差异很大,比如这张图片是使用您的代码生成的结果以及他这个项目生成的结果对比,result2我用测试代码运行您的patchmatch得到的图片(view1.png-d.png),以及另一个项目得到的图片(203_dispLR_so.png)去分别测试做对比,结果发现您的图片得到的结果错误率为99%。99
然而实际上肉眼可见您的方法生成的图片效果更好,是什么原因导致的这样的结果呢?路径是因为生成的图片的格式问题嘛?因为我看到您的方法生成的图片的灰度貌似看上去和他这个项目生成的图片灰度不一样2.可以把AD-Census以及PatchMatch两个算法取各自最优的部分结合起来,然后得到更好的测试结果吗?3.您有专门用来测试的更好的测试代码吗?谢谢!

Accuracy on Kitti dataset

Can I use Kitti 2015 dataset instead of Middlebury? With Kitti I am getting 3-pixel error of around 15-16%. Can you suggest methods to further reduce it. Also, can you please explain significance of these parameters:
// alpha
. pms_option Alpha = 0 . 9F ;
// t_col
. pms_option tau_col = 10 . 0F ;
// t_grad
. pms_option tau_grad = 2 . 0F ;
// Number of propagation iterations
pms_option. num_iters = 3 ;

Can I alter these parameters to reduce accuracy.

关于pms_propagation.cpp里ViewPropagation的一个问题

首先感谢大佬分享
在论文第5页 View Propagation中,作者提到: “We check all pixels of the second view that have our current pixel p as a
matching point according to their current plane”。
但是在代码实现中,好像是用当前点 p 的视差计算出了唯一的一个对应点 p'
是我理解有误还是,这一点不是特别重要 被省略掉了?
`void PMSPropagation::ViewPropagation(const sint32& x, const sint32& y) const
{
// --
// 视图传播
// 搜索p在右视图的同名点q,更新q的平面

// 左视图匹配点p的位置及其视差平面 
const sint32 p = y * width_ + x;
const auto& plane_p = plane_left_[p];
auto* cost_cpt = dynamic_cast<CostComputerPMS*>(cost_cpt_right_);

const float32 d_p = plane_p.to_disparity(x, y);

// 计算右视图列号
const sint32 xr = lround(x - d_p);
if (xr < 0 || xr >= width_) {
	return;
}

const sint32 q = y * width_ + xr;
auto& plane_q = plane_right_[q];
auto& cost_q = cost_right_[q];

// 将左视图的视差平面转换到右视图
const auto plane_p2q = plane_p.to_another_view(x, y);
const float32 d_q = plane_p2q.to_disparity(xr,y);
const auto cost = cost_cpt->ComputeA(xr, y, plane_p2q);
if (cost < cost_q) {
	plane_q = plane_p2q;
	cost_q = cost;
}

}`

关于数组的转化问题

大佬您好 我想问一下 您这个跑到最后得到的是不是一个float的数组呀?如果我想转化为Mat数组进行操作,具体要怎么做呢?是不是想如图中这里在ShowDisparityMap函数中的操作就是在转化为Mat呀?disp_mat就是得到的Mat类型的数组?
2月21日

关于测试我自己的图像

您的工作对我帮助很大,谢谢!如果我想用您的程序测试自己的数据,我该更改哪些参数?

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.