Hello, I made a basic application that collects frames from Camera and write these on Disk as jpg images. My device is Nreal Light DevKit.
Well, I am able to collect and write frames successful but captured images are unfortunately Upside Down
In order to collect and write frames, I use the class âCameraCaptureController.csâ shipped with NRSDK v1.8. ( NRSDK > Demos > RGBCamera > Scripts ). The scene that I use was the âRGBCameraâ from NRSDK. ( NRSDK > Demos > RGBCamera.unity)
In particolar, I made the following modification into the âUpdate()â method of the class:
// UnityEngine.Texture2D
Texture2D img = RGBCamTexture.GetTexture();
// UnityEngine.ImageConversion
byte[] jpg_image = ImageConversion.EncodeToJPG( img );
string img_fl_name = â/sdcard/imgs/screen__â+this.RGBCamTexture.CurrentFrame.timeStamp+".jpg";
// System.IO.File
File.WriteAllBytes( img_fl_name , jpg_image );
This one was the only modification I made. (Scene remains in her default settings)
As side note, I specify that Unity Project was configured following Nreal Official Guide (Quickstart for Android - NRSDK Documentation) and Unity version that I use was âUnity 2019.4.26f1â.
Does anyone have any idea about the issue ?