2

我正在研究opencv的半全局块匹配。事实上,我不明白为什么我们需要浏览所有方向来计算成本聚合?有没有人试图限制这条路径(扫描线)的长度?

4

1 回答 1

6

The cost aggregation involves searching in multiple directions to enforce a global smoothness constraint on your solution. Without these constraints the disparity for each pixel is computed without consideration of the estimated disparity of its neighbors and the result will typically contain a lot of 'noise' as the matching process will return many false positives.

By assuming that the observed surfaces are quite smooth you can penalize disparity shifts by setting an additional cost of assigning a depth to a pixel if it doesn't agree with its neighbors. Loosely, this means that when you try to estimate a depth and have several possible matches, you will probably choose the match which agrees closely with the depth estimates of the neighboring pixels. Searching in more directions increases the number of neighbors you consider in your cost calculation and will generally increase the

OpenCV doesn't provide a method of reducing the length of this search path but if you want the algorithm to run more quickly you can either disable some of the directions, only searching 5 paths instead of 8 (this is performed by setting the argument fullDP to false) or by reducing the disparity search range.

于 2013-02-08T18:40:41.313 回答