Ask Your Question

Revision history [back]

Can StereoSGBM support 16bit single channel?

Hello guys,

Once I was trying to use StereoSGBM compute to process 3D depth map with 16 bit single channel images via python + OpenCV3, OpenCV showed an error like "the left image's depth doesn't match 8 bit single channel". Looking at the code[1], exactly current OpenCV looks to restrict the data depth as CV_8U (i.e. uint8) and that's why I got the error.

And then, when I tried to to rebuild OpenCV changing the assertion as CV_16U (i.e. uint16, 16 bit channel), it seems to work well even though I expected to get some problems like compile error or core dumped at running time.

Absolutely, I'm a newbee for this tech and I'm not sure if it exactly works well or not, so that I'm wondering if someone lets me know if it still could contain some problems or issues (or yeah, it's no problem!)

Thanks and Best,