Skip to content Skip to sidebar Skip to footer

Tango Camera Preview For Rgbir

I am using Tango's demo for videoOverlaySample. Instead of color, I would like to see the IR data (alone or with color). So, I replaced TANGO_CAMERA_COLOR with TANGO_CAMERA_RGBIR i

Solution 1:

You can't use

tangoCameraPreview.connectToTangoCamera(mTango,TangoCameraIntrinsics.TANGO_CAMERA_RGBIR);

The Java API does not provide a connectToTangoCamera with the RGBIR, only Color and Fisheye camera (see here)

To display the a depth image instead of the color image, you have to compute the depth image by hand. Therefore you roughly have to:

  1. Transform the point cloud with the pose at its given timestamp to the camera frame.
  2. Project the point cloud points (x,y,z) to receive the pixel (x,y)
  3. You need an array with the resolution of the camera frame (1240x720).
  4. Fill up the array with 0 (black).
  5. Store the z-value at its given pixel position (upsample your pixels, because the depth camera has only a resolution of 320x180)
  6. In OpenGL you can than easly use that array for your texture.

For more details, I recommend you to look into the C example rgb-depth-sync

Post a Comment for "Tango Camera Preview For Rgbir"