Search code examples
c#unity-game-engineoculusoculusquestopenxr

How to get data from quest3 color camera, or get data from passthrough, but in video streaming form?


I want to make an application where one of the steps is to make sense of the items around me, I initially wanted to use the self contained scene understanding but I found out that it has to do a spatial scan first which doesn't meet my expectations, I want him to be real time so I want to get the camera information to use to implement the item recognition function myself.

How to get data from quest3 color camera, or get data from passthrough, but in video streaming form?

If not, is there an appropriate solution for my need?

Platform: Unity, but as long as it solves the problem, I don't care about the platform!

Thank you very much!

I tried to use this code,but it not work on quest3

WebCamDevice device = WebCamTexture.devices[currentCamIndex];
int width = 1000;
int height = 1000;
webCamTexture = new WebCamTexture(device.name, width, height, 24);

Solution

  • There is no API available for this purpose - access to the cameras and camera feeds is restricted.

    You may be able to use scrcpy to capture the passthrough camera feed for off-device processing, but this sounds like it probably isn't what you're after.

    This particular feature is something that many developers have requested, but so far Meta have not obliged. I can't find an official statement about it, but the general consensus appears to be that it's a deliberate restriction due to privacy considerations.