0

I'm using Unity VideoOverlayListener to retrieve video overlay from tango tablet camera. But fps is too low, I guess this is because the resolution of the video is too high (1280 x 720). Is there a way to lower resolution?

DikobrAz
  • 3,557
  • 4
  • 35
  • 53

2 Answers2

2

The reason for the slow-down is multiple buffer copies on the image byte data. Currently the API does allow the desired resolution to be specified. No matter what you do on the Unity side, this method of getting the video overlay will always be slow and is experimental.

If you're not using depth information in your application, you can still use the built-in functionality for grabbing the overlay in Unity. This is because usage of the depth provider causes the Tango APIs to consume the camera, so no other applications can access it.

Chase Cobb
  • 176
  • 3
  • Yes, I've already noted that. Have you any success with TangoService_connectTextureId? – DikobrAz Jan 05 '15 at 20:04
  • That will not work in Unity. It won't work with a Texture/Texture2d and requires an OpenGL extension and texture format that they don't currently support. – Chase Cobb Jan 06 '15 at 16:48
1

You could use WebCamTexture to put the video feed onto a texture that is as small as you want. I would think that a small texture would make the fps go down as the tablet would then have to work harder to compress the camera feed. The native resolution would most likely be the fastest. There is a Requested FPS variable that might help though. http://docs.unity3d.com/ScriptReference/WebCamTexture.html

General optimizations for android or even the tegra k1 specifically may also help. http://www.slideshare.net/AlexanderDolbilov/google-i-o-2014

  • Thanks, but unfortunately WebCamTexture doesn't work with tango depth provider. Once you start using it, depth callback stops being called. – DikobrAz Dec 27 '14 at 17:53
  • That is true, because they are consuming the same camera hardware. once Unity occupied the camera, Tango Service lost the opportunity to take it again, unless Unity release it.. – xuguo Jan 08 '15 at 00:16