1

I am trying to retrieve depth image from google`s tango device (with point cloud all is fine) using Unity and tango sdk, but what I got differs much from what is written in https://developers.google.com/project-tango/overview/depth-perception.

In my environment xyzij.ij_rows = 0, xyzij.ij_cols = 1241000304, xyzij.ij returns pointer to very large numbers and so on. Does any one had a luck to get depth images from tango device? If yes, can you provide some code snippets or some information about this?

Steven
  • 166,672
  • 24
  • 332
  • 435
Vahagn Nahapetyan
  • 1,337
  • 13
  • 22

1 Answers1

1

From the known issues: (see https://developers.google.com/project-tango/apis/known-issues)

The IJ buffer of the XYZij struct is under development and not yet populated via the API.

Though this is part of the public API, the values are currently meaningless. I've been getting around it by doing the projection to screen coordinates manually, though there's probably an easier method using Unity.

Community
  • 1
  • 1
Jon C. Hammer
  • 392
  • 4
  • 8
  • 1
    Thanks Jon for the reply. You are absolutely right, IJ buffer is not populated with correct data, but we found another solution to this. You can find depth image from point cloud using this formula: (i-w/2)/fx = x/z (j - h/2)/fy = y/z where w and h are depth image width and height. fx and fy are focal lengths of tango sensor, (x,y,z) - are point real world coordinates. Depth image will be the array of (i,j,z) In our case w = 320, h = 180, fx = 254.576000, fy = 254.503000. – Vahagn Nahapetyan Mar 31 '15 at 09:08