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:
- Transform the point cloud with the pose at its given timestamp to the camera frame.
- Project the point cloud points (x,y,z) to receive the pixel (x,y)
- You need an array with the resolution of the camera frame (1240x720).
- Fill up the array with 0 (black).
- Store the z-value at its given pixel position (upsample your pixels, because the depth camera has only a resolution of 320x180)
- 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"