Increasing max disparity for cuda::stereoBM

asked 2017-07-03 04:57:23 -0600

The cuda::stereoBM is limited to max disparity of 256. Is it possible to increase it by editing the code, more so, will increasing it in the code work as it is an extension of the stereoBM function of opencv.

const int max_supported_ndisp = 1 << (sizeof(unsigned char) * 8);

This is the line which sets the max_disp in the cuda::stereoBM. So if I change it to 10 and increase max to 1024, will it work or will it not be supported? 1024 is divisible by 8 so it shouldn't give an error for disp value as well.

I require to increase the disp so as to get non spliced pointclouds. This is one way, the other approach would be to limit the image to a particular range. But I am not sure about where I can set that in the code.

Any insights would be very helpful! Thanks!

edit retag flag offensive close merge delete