Question

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?

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top