nreal developerのページをざっと流し見して、日本語でも読みやすいように補助的な記事を書いていきます。この記事はRGB Camera編です。
https://developer.nreal.ai/develop/unity/rgb-camera
こちらと一緒に見ていきましょう!
他の記事
nreal developerページをざっと読んでみた (Discover編)
nreal developerページをざっと読んでみた (Quickstart編)
nreal developerページをざっと読んでみた (Image Tracking編)
nreal developerページをざっと読んでみた (Controller編)
目的
NRSDKを介してNreal LightグラスからRGBカメラデータを取得するサンプルアプリを作成する方法を学びます。
Open the Sample Scene (サンプルシーンを開く)
Assets > NRSDK >Demos > RGBCameraシーンを開きましょう。
Build and Run the Sample App(サンプルアプリをビルド)
ケーブルつないでBuild and Run。
Assets > NRSDK > Demos > CameraCapture > Scripts > CameraCaptureController.csを見るとRBGカメラによってTextureを取得する処理が書かれています。
public RawImage CaptureImage;
private void Start()
{
RGBCamTexture = new NRRGBCamTexture();
CaptureImage.texture = RGBCamTexture.GetTexture();
RGBCamTexture.Play();
}
アウトプット
RBGカメラで取得した画像をRawImageに代入。