OpenNI 1.5.7
Coordinate Systems

OpenNI defines two types of coordinate systems:

  • Projective Coordinates - a two-dimentional map of depth values
  • Real World Coordinates - A collection of three-dimentional points.

Those two coordinate systems are defined as below:

FeatureProjective CoordinatesReal World Coordinates
X-Y Unitspixelsmillimeters
Z Unitsmillimetersmillimeters
X-Y Originupper-left corner of the FOVcenter of FOV
Z Originsensor's planesensor's plane
X Directionleft to rightleft to right
Y Directiontop to bottombottom to top
Z Directionaway from sensoraway from sensor

A main difference between the two is that in projective coordinates, a real-world object (person, chair) gets bigger (in pixels) as it gets closer to the sensor, whereas its real-world size remains the same.

Note
Some data in OpenNI is returned in projective coordinates (for example, depth maps), and some is returned in real-world coordinates (for example, skeleton joints). Pay attention when comparing the two.

A depth generator creates the depth value of each pixel. By knowing the distance of the object and some geometrical information about the sensor (like its FOV), translation can be made between the two systems. see xn::DepthGenerator::ConvertProjectiveToRealWorld() and xn::DepthGenerator::ConvertRealWorldToProjective().