Log in or register to post comments

Android Java Nexus 5X back camera is rendered upside-down (rotat

February 22, 2016 - 9:31am #1

Vuforia SDK Version: vuforia-sdk-android-5-0-10 -

Description with steps to reproduce:

On the Google Nexus 5s the background video texture is rendered upside-down. This is related to similar problems with the front ("selfie") camera on the Google Nexus 6. It appears that you are not checking for the orientation of the camera sensor on devices where they are mounted in a non-standard way. Please see this link for more details: 

https://www.reddit.com/r/Android/comments/3rjbo8/nexus5x_marshmallow_camera_problem/

The top comment in the default sorting of comments there is from a Google camera engineed.

 

Summarizing the above, prior to the introduction of the Google Nexus 5X (back camera) and the Google Nexus 6 (front "selfie" camera), most manufacturers of Android devices mounted their camera sensors oriented the same way. There has been API in Android to learn the orientation of a camera at runtime in order to compensate for non-standard sensor rotation for some time, but most developers have not noticed a need for or have not bothered to perform such compensation due to the rarity of non-standard camera rotation on devices in common use. Vuforia does not perform this compensation, which results in an "upside-down" (rotated) camera texture on these newer devices.

 

The common way to draw a the video from the camera in Java on Android is to use the Render object's drawVideoBackground method. In setting up that object a developer can indicate to the system whether the camera image should be mirrored vertically (to make the "selfie" camera's rendering more normal / comfortable for the user) and to set the size of that rendering, but there is no way to use that API to rotate the video texture; there is no work-around for this bug using the most common way to draw the video from the camera in Vuforia.

 

 

-

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

Mobile OS and Version: Android v. 6 -

Mobile Device Manufacturer and Model name: Google Nexus 5X -

Do the Vuforia Sample Applications show the same behavior?: Yes

Android Java Nexus 5X back camera is rendered upside-down (rotat

February 25, 2016 - 6:10am #4

Yes, thank you for pointing that out. We are aware that the issue is also affecting native Vuforia, not just Unity.

I hope to be able to give an update on this soon.

Android Java Nexus 5X back camera is rendered upside-down (rotat

February 24, 2016 - 7:39pm #3

Affirmative. Except all work-arounds referenced in this and other, similar threads are for Unity. We are not using Unity, so therefor we thought it prudent to mention that this bug is present in the base system and has (as far as we know) no simple work-around there. If nothing else, this serves as a reminder that whatever fix is created should be tested outside of Unity as well. 

Android Java Nexus 5X back camera is rendered upside-down (rotat

February 22, 2016 - 10:38am #2
Log in or register to post comments