Pergunta

I'm working on semi global block matching of opencv. In fact, I don't understand why we need to browse all direction to compute cost aggregation? Has anyone tried to limit the lenght of this path (scanline)?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top