문제

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