Open KeoChi opened 4 years ago
sry, I do not know what OpenCV does to compute the SGBM disparity, or how it stores it; check its documentation and then have a look at how I convert my disparity map to depth map SemiGlobalMatcher::ExportPointCloud()
According to my understanding, the left image matches the right image, the value of disparity map should be positive. Why does the value of leftDisparityMap is negative? I found that the disparity value of the two(opencv and openmvs) is exhaustive.
Depth depth(Image::Disparity2Depth(Q, ImageRef(c , r), (float)-disparity / subpixelSteps, u));
Depth value of both is exhaustive. But the poincloud generated by ExportPointCloud is still wrong.
I try to use opencv sgbm in SemiGlobalMatcher::Match. For example:
I set subpixelSteps to 16. Then I found that the poincloud generated by ExportPointCloud is wrong. I output disparity_map_masked of opencv sgbm and leftDisparityMap of openmvs sgm to text. And
I found that the two diaparity values are different. The disparity_map_masked is positive value and the leftDisparityMap is negative value. disparity_map_masked.txt leftDisparityMap.txt How should I use opencv sgbm correctly in openmvs? Look forward to your reply. Thank you!