Вопрос

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