picoxr / GetCameraFrame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GetCameraFrame

DISCLAIMER: This API is reserved for Enterprise developers who sign up for our testing program. If you're interested in joining, reach out to pico-business-techsupport@bytedance.com

Description

This demo acquires an anti-distorted frame from a VST camera, processes it into a texture, updates a UI element to display the texture, encodes the texture to a JPG, and sends the encoded image to Azure Vision API for further analysis.

Setup

  • Once you have a PICO Enterprise authorization (by reaching out to the address above), you must change the package name to the one you provided for the authorization procedure.
  • The package name is bunlded with the SN code of your authorized device. Running the apk with another package name, or on an different device, will result in the API not providing any camera data.
  • [OPTIONAL] You can also set up an Azure Computer Vision resource. You can then set your resource endpoint and API key in the code. API reference

Demo requirements

  • Unity 2022.3.f1
  • PICO XR SDK 2.5.0
  • OPTIONAL: An Azure subscription with a computer vision resource

Dependencies (UPM)

  • XR Interaction Toolkit 2.5.2 + Starter Assets
  • Android Logcat

Third party assets

About AcquireVSTCameraFrameAntiDistortion

Acquires RGB camera frame (the image after anti-distortion).

Parameters

Parameter Description
width Desired frame width, should not exceed 2328.
height Desired frame height, should not exceed 1748.
out frame Frame info.

API Reference: https://developer.picoxr.com/reference/unity/latest/PXR_Enterprise/#05920ad3

Demo

Camera_LowRes.mp4

About


Languages

Language:C# 93.4%Language:ShaderLab 6.0%Language:HLSL 0.6%