OpenCV's reprojectImageTo3D is supposed to provide xyz coordinates from a disparity image and a Q projection matrix. It returns a 3-channel unsigned char image, _3dImage. Each element of _3dImage(x,y) contains 3D coordinates of the point (x,y) computed from the disparity map. How is one supposed to access the xyz coordinates from the image?

有帮助吗?

解决方案

oh, wait, it's not a 3-channel unsigned char image, but a 3-channel float image

Point3f p = _3dImage.at<Point3f>(row,col);
// p.x
// p.y
// p.z
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top