I’m comparing the Block Matching to the Semi-Global Block Matching algorithms in VisionWorks. I understand that the output of SGBM (nvxSemiGlobalMatchingNode) is a Q11.4 formatted S16, whereas the output of BM (nvxStereoBlockMatchingNode) is a U8. Two questions:
What is the best way to convert that U8 to an S16, in Q11.4 format? I tried vxConvertDepthNode(), but it only does a bit shift…I think it also needs a scaling factor, no?
Do you happen to know if the Q11.4 signed format of SGBM output is the same as the OpenCV StereoSGBM class function (specifically computeDisparitySGBM())? I think it is, but just want to check.
vxConvertDepthNode converts disparity from fixed point into gray scale.
Please check our document for the conversion rules:
[i]>> VisionWorks API
Khronos OpenVX 1.1 API
OpenVX API Modules
Vision Functions
Convert Bit Depth
vxConvertDepthNode[/i]
For question2, sorry that we are not familiar with the output format of OpenCV SGBM.
It’s recommended to check the output format in detail.
Suppose different implementation may have different disparity representation.