Search code examples
androidandroid-studiogoogle-project-tango

How to construct depth image using the point cloud data from Tango


Mobile: Lenovo Phab 2 Pro

Coding language: Java

Level of expertise: novice

IDE Used: Android Studio

Is it possible to construct depth image using the point cloud data provided by Tango API?

  1. I do not want to use RBG camera.
  2. I imported Tango Support library (com.google.tango.support.TangoSupport) and tried to access 'TangoSupport.DepthBuffer'. I receive following error 'can not resolve symbol DepthBuffer'

Solution

  • The tango framework provides you an unorganized pointcloud which means that the points in your cloud have no corresponding pixel.

    But you can construct an organized pointcloud via the available depth camera intrinsics. (Mainly you need the focal length of the camera and its principal point)

    https://developers.google.com/tango/apis/java/reference/TangoCameraIntrinsics

    This will allow you to calculate the index of a point which lies or lies not into your depth image. To get the most accurate mapping, you also should consider the corresponding camera distortion.