Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is it possible to get Data Cost Matrix for Stereo Matching Algorithms?

Hello:

For an assignment in stereo matching I have to program some stereo confidence measures, like Left-Right consistency or Peak Ratio, and estimate the quality of the obtained disparity map for selected stereo matchers, like OpenCV's StereoBM and StereoSGBM.

For some of those confidence measures, the 3D Data Cost Matrix is required. This matrix stores, for each pixel p in the image and for each possible disparity value d, d_min <= d <= d_max, the cost to associate d to p. A matcher using the "Winner takes it all" strategy, would return as the selected disparity the value d* that is minimum.

I wonder if it is possible to get the 3D Data Cost Matrix from the StereoBM and StereoSGBM implementation. I've reviewed the code of StereoSGBM and there's a function called calcPixelCostBT that I think calculates this matrix, but I'm not totally sure.

I hope someone can shed some light into this issue.

Best regards!

Robst