StereoSGBM will leave a black band in the right of disparity output too (Bug #4144)
Description
This was for the left band:
_Seems output pixel in the black band always has value "0".
according to comments of "calcPixelCostBT":
max(-maxD, 0) <= minX <= x < maxX <= width - max(0, -minD)
but, in its implemention:
minX1 = std::max(maxD, 0)
So I makes "maxD" to "-maxD", and the black band disappeared.
There's the same problem for the right band,
so it should be:
int minX1 = max(-maxD, 0), maxX1 = width - max(minD, 0);
instead of
int minX1 = max(-maxD, 0), maxX1 = width + min(minD, 0);
Thank you for your work,
Mathieu.
History
Updated by mathieu letombe about 10 years ago
The left band bug report was in : (Bug #3378)
Updated by Philip L almost 10 years ago
PR was merged into opencv
- Status changed from New to Done
- % Done changed from 0 to 100