Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenNI computes the world coordinates the following way:

 worldX=(X-Cx)*Z*tga/(imW/2);
 worldY=(Y-Cy)*Z*tga/(imW/2);
worldZ=Z;

where tga=tan(0.5085) (tangent of the half horizontal FOV), Cx and Cy the center coordinates and imW the image width in pixels.

You can use this formula to check the results: measure on the image the distance of the checkerboard corner from the center (using the size of the black squares) and see if it matches the result of the formula and the data obtainedwith both methods.

OpenNI computes the world coordinates the following way:

 worldX=(X-Cx)*Z*tga/(imW/2);
 worldY=(Y-Cy)*Z*tga/(imW/2);
worldZ=Z;

where tga=tan(0.5085) (tangent of the half horizontal FOV), Cx and Cy the center coordinates and imW the image width in pixels.

You can use this formula to check the results: measure on the image the distance of the checkerboard corner from the center (using the size of the black squares) and see if it matches the result of the formula and the data obtainedwith obtained with both methods.