Log in or register to post comments

Camera Front mirror image issue on 4.2.3

May 11, 2015 - 3:17am #1

Vuforia SDK Version: 4.2.3 -

Description with steps to reproduce:

Hi,

I'm using Vuforia as a complement for my application on Unity 4.5.5f1. The vuforia's part is only a module the user can enable/disable. I need to activate and deactivate Vuforia from time to time.

I've been able to put the ARCamera prefab into the scene and activate/deactivate the gameObject in order to get the camera stream when needed.

In my specific case, I need to use the front camera (with mirror image ON), and use NGUI at the same time.

I first tried to implement my module using the Vuforia SDK 4.0.103. I had the camera image as I wanted, but also had an issue with NGUI (similar to https://developer.vuforia.com/forum/issues-and-bugs/vuforia-40-messed-overlay-ui).

Now I'm using Vuforia SDK 4.2.3, I don't have any issue with NGUI anymore, but the "mirror image" for the Camera Front doesn't work at the first launch.

  • Step 1 : Enable ARCamera prefab (set on CAMERA_FRONT, and mirror image ON) : Camera image is upside down
  • Step 2 : Disable ARCamera prefab
  • Step 3 : Enable ARCamera prefab : Camera image is normal

Tested on :

  • Samsung Galaxy Note 3 / Android 4.4.2
  • Samsung Galaxy S3 / Android 4.4.4
  • Note : I've tested on a Google Nexus 4 / Android 5.1 too but it's less stable. I have sometimes the stream frozen, sometimes not.

Is there something that I missed or is it a bug from SDK 4.2.3 ?

Thank you for your help.

-

Development OS (Mac OS X, Windows, Linux): Windows -

Mobile OS and Version: Android 4.4.2 -

Mobile Device Manufacturer and Model name: Samsung Galaxy Note 3 -

Do the Vuforia Sample Applications show the same behavior?: Tested the UserDefinedTargets sample. I changed to Camera Front, and both mirror image ON and OFF result to an upside down image.

Camera Front mirror image issue on 4.2.3

July 29, 2015 - 2:07pm #3

Camera Front mirror image issue on 4.2.3

May 11, 2015 - 5:32am #2

Thanks for the report.

We were able to reproduce this same issue with the following steps:

- Create an empty Unity project and import the Vuforia Unity Extension 4.2.3

- Add an ARCamera to the scene

- Select Camera Direction = FRONT

- Select Player Settings (Android) > Device Orientation = Portrait

- Build and run on Android device

- Observe video background upside down

 

We will address this issue in a next release of Vuforia.

In the meantime, a workaround is to programmatically set the Camera to FRONT in a script, e.g. using some code like the following:

using UnityEngine;
using System.Collections;
using Vuforia;

public class DirSwap : MonoBehaviour 
{
  void Start() {
      QCARBehaviour qcar = (QCARBehaviour) FindObjectOfType( typeof(QCARBehaviour) );
      qcar.RegisterQCARStartedCallback ( OnVuforiaStarted );
  }
  private void OnVuforiaStarted() {
    
      CameraDevice.Instance.Stop();
      CameraDevice.Instance.Deinit();

      CameraDevice.Instance.Init(CameraDevice.CameraDirection.CAMERA_FRONT);
      CameraDevice.Instance.Start();
  }
}

 

Log in or register to post comments