This document describes conventions for 2D and 3D coordinate systems. Each sensor device has an associated independent coordinate system.
2D Coordinate Systems
The depth camera and color camera have independent associated 2D coordinate systems. The [x,y] coordinates are in units of pixels, where x ranges from 0 to width-1, and y ranges from 0 to height-1. The width and height depend on the chosen operating mode for the depth and color cameras. The pixel coordinate [0,0] corresponds to the top-left pixel in the image. Pixel coordinates can be decimal values representing subpixel coordinates.
The 2D coordinate systems are centered at 0, meaning the subpixel coordinate [0.0, 0.0] denotes the center, [0.5,0.5] denotes the bottom-right corner of a pixel, as shown below.
3D Coordinate Systems
Each camera, accelerometer, and gyroscope has an associated independent 3D coordinate space system.
Points in the 3D coordinate systems are represented as [X,Y,Z] metric coordinate triplets in millimeters.
Depth and Color Cameras
The origin [0,0,0] is located at the camera focal point. The positive X-axis points right, positive Y-axis points down, and positive Z-axis points forward.
The depth camera is tilted down 6 degrees towards the color camera, as shown below.
The depth camera uses two illuminators. The illuminator used in Narrow Field of View (NFOV) mode aligns with the depth camera use case and thus does not tilt. The illuminator used in Wide Field of View (WFOV) mode tilts an additional 1.3 degrees down relative to the depth camera.
Gyroscope and Accelerometer
The origin [0,0,0] of the gyroscope is the same as the origin of the depth camera. The origin of the accelerometer aligns with its physical location. The coordinate system of the accelerometer and gyroscope follow the right-hand rule. The positive X-axis points backwards, positive Y-axis points left, and positive Z-axis points down, as shown below.