Hi,
We are trying to solve a video lag problem for a long time without any success. In our app, we are using
CameraDevice.Instance.GetCameraImage(PIXEL_FORMAT);
inside of
private void OnTrackablesUpdated()
to capture the camera's image for further processing. To make it work, we need to set the pixel format. On mobile devices (not in the editor) the correct format is
Image.PIXEL_FORMAT.RGB888
Our implementation is very similar to here: https://library.vuforia.com/articles/Solution/Working-with-the-Camera#How-To-Obtain-HD-Camera-Frames.
Since we upgraded from old versions of Unity and Vuforia (Unity 5.6) we have the problem that the camera video stream becomes laggy as soon as the pixel format RGB888 is set. We tried using different pixel formats and unregistering the pixel format after we captured the image but the laggy video remains until vuforia or the scene is reset. This happens on iPhone 7 Plus but not on iPhone X, see versions below. We have only regular 2D Vuforia image targets in our scene. This problem exists only on iOS, on Android and in the Editor the video stream is fine.
Any idea what could cause this problem? Could it be related to ARkit?
In the video I uploaded here, I move the phone up and down and you can see that after 4 seconds the video starts to lag: https://www.dropbox.com/s/38cn2lzrq1z1l88/IMG_2897.TRIM.MOV?dl=0
Versions:
Unity 2018.2.5f1
Vuforia 7.2.23
iPhone 7 Plus, iOS 11.4.1
iPhone X, iOS 11.4.1
Xcode 9.4.1
Hi there!
We're having the same problem here. After setting the pixel format the live image gets delayed by about 1-1.5 secs...
This is reproducable on an IPad Pro A1673, with IOS 12.0 - but not on an IPhone 6, running 11.2.
So far I understand, that ARKit changed its version with IOS 12.3, so I rather suspect some relation to this.