Aaron Roller
Aaron Roller

Reputation: 1074

What are the units of X,Y for Google Project Tango Depth data?

From the depth data reference:

With the unit in landscape orientation, screen facing the user: +Z points in the direction of the camera's optical axis, and is measured perpendicular to the plane of the camera. +X points toward the user's right, and +Y points toward the bottom of the screen. The origin is the focal centre of the color camera. The output is in units of metres.

Notice the unit of the values is apparently in metres. Looking at the actual values observed from the Tango Device it is clear the Z value (depth) is in meters.

X and Y values, however, do not appear to be in meters. This spreadsheet and another of x,y,z values shows actual results from the Tango point cloud. The min/max values of all the point clouds I've seen seem to indicate the units of x,y are in radians since the values are less than 2, but can be greater than 1.

My goal is to convert the observed points to real world coordinates matching the pose data (in Java).

What are the units of x,y?

Upvotes: 1

Views: 605

Answers (2)

rhashimoto
rhashimoto

Reputation: 15841

All the coordinate elements of a depth cloud point - X and Y as well as Z - are in meters. Naturally any triplet (X, Y, Z) must lie within the field of view of the depth camera. The allowable range of X and Y thus depends on the value of Z: X must satisfy abs(arctan(X/Z)) <= fovX/2 (and similarly for Y).

The X and Y ranges you are observing in your sample frames are not angle radians (or normalized in any way); they only appear to be in in that range because of the typical Z distance of your scene. If Z happens to be larger in a different scene then X and Y can also be larger and satisfy the field of view relation.

Upvotes: 1

Fran&#231;ois Pilote
Fran&#231;ois Pilote

Reputation: 368

From what I understand, the X and Y coordinates are in camera space. The origin being in the center of the camera.

There is no units per se for X,Y since they are relative to the camera frame.

The data in the spreadsheet seems to confirms this. X and Y are normalized between -1.0 and +1.0

If you are using the Unity Samples, I suggest that you give a look at TangoPointCloud.OnTangoDepthAvailable where each point is being transformed in world space.

m_points[i] = unityWorldTDepthCamera.MultiplyPoint(new Vector3(x, y, z));

Hope this helps.

Upvotes: 0

Related Questions