-1

Using Google Project Tango tablet, I want to take a selfie during an Area Learning usage session. That is, it's learned an area, now I want to have the AR tracking working while I take a selfie. I tried using the WebcamTexture Unity has to get at device 2 (the front facing camera), but the logcat says:

Unable to initialize camera: Fail to connect to camera service

My guess is Tango takes over all the cameras and disallows having this happen. Is there a way around this? Can I temporarily suspend the AR camera(s), turn on the front camera for a while, save a frame of that, then stop the front camera, then resume the AR camera(s)? And would I be able to use IMU data to keep some sense of orientation while the AR camera(s) off? Using Unity.

Dave A.
  • 43
  • 5
  • Possibly related: http://stackoverflow.com/questions/30377081/access-both-back-and-front-cameras-simultaneously – rhashimoto Feb 22 '16 at 01:24
  • Related, yes. I don't know if this applies to Tango at all though. Does anyone know if this is a hardware restriction, or if it's possible, perhaps through native code, if I can't use Unity's handy API? – Dave A. Feb 24 '16 at 20:19

1 Answers1

0

In order to access camera from process other than Tango Service, you have to disconnect the Tango Service.

However, you should be able to get store a camera image from just AR Camera. See this post: Unity plugin using OpenGL for Project Tango

Community
  • 1
  • 1
xuguo
  • 1,816
  • 1
  • 11
  • 15
  • Thanks. Is that complicated? I find that the ADF stuff can be imprecise, it can appear to be tracking when it's not really in the scanned area. If I disconnect and reconnect, wouldn't it reset to 'undefined' and require acquisition, which may be a false-positive anyway? Also, looking for 'front' camera, which is not enumerated in the Tango code, it seems. – Dave A. Feb 20 '16 at 06:53
  • Hi Dave, I would suggest not disconnect the Tango Service, because as you mentioned, it will reset the motion tracking. So I suggest use the solution in link from the post. It save an image using Tango camera API calls. – xuguo Feb 23 '16 at 18:34