Kinect V2 Depth Frame Pixel Size

◇◆丶佛笑我妖孽 提交于 2019-12-23 05:37:16

问题


The kinect v2 provides a depth frame with the resolution of 512 x 424 pixels with a fov of 70.6 x 60 degrees resulting in an average of about 7 x 7 pixels per degree. [Source].

However I was unable to find any kind of information about the pixel size of the depth frame, or is there any kind of method to calculate the pixel size from the given information?


回答1:


Are you asking how you to map size of pixels in the depth data?

The depth coordinate system is orthogonal with it's origin and orientation at the KINECT sensor. Basic trigonometry tells us a relationship between opposite side and adjacent side in a right angle triangle is Tan A = a/b, so horizontally we have tan(FOV/2) = (FrameWidth/2)/depth, hence FrameWidth = 2*depth*tan(35.3), and so the width of 1px = depth*2*tan(35.3)/512, similarly the height of 1px = depth*2*tan(30)/414.

const int FRAME_WIDTH = 512;
const int FRAME_HEIGHT = 424;
const float FOV_HORIZONTAL = 70.6 * PI / 180.0; // convert to radians
const float FOV_VERTICAL = 60.0 * PI / 180.0;   // convert to radians
const float HORIZONTAL_SCALING = 2 * std::tan(FOV_HORIZONTAL / 2.0) / (float)FRAME_WIDTH;
const float VERTICAL_SCALING = 2 * std::tan(FOV_VERTICAL / 2.0) / (float)FRAME_HEIGHT;

for each depth pixel you can compute its width and height by doing a simple scaling:

width = HORIZONTAL_SCALING * (float)depth;
height = VERTICAL_SCALING * (float)depth;


来源:https://stackoverflow.com/questions/45183735/kinect-v2-depth-frame-pixel-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!