Bug: Nexus 5X augmentation is upside down

Hello there,

Finally got around assembling my Aryzon viewer and tested it with my Nexus 5X.

Disappointment: the augmentation is upside down (reversed). This is most likely due to the way the camera is mounted in this device: exactly the other way around than almost any Android device out in the wild.

This is a known “issue” with this device since it’s launch in 2015.
Actually the Android spec states that there is a dedicated variable which should be queried for the camera orientation.

Shout out to devs: could you please look into this and fix in next Android release?

The explanation is here on Reddit:

Quoting for convenience:

Hi - Tech lead for Android’s camera framework here.

Image sensors on a compliant Android device can be mounted in one of two ways. Most devices use one way, so a lot of camera apps have never been tested on devices that pick the other way.

Because of manufacturing reasons, we needed to mount the Nexus 5X main sensor in the less-common (reverse landscape) orientation - the wires from the sensor chip wouldn’t have fit otherwise.

Unfortunately, our old camera API (which is deprecated, but most apps still use it) isn’t terribly user-friendly, and requires application developers to explicitly set the preview rotation. On most devices, though, it turns out the default rotation is correct for a forced-landscape app, so many apps never call the display orientation method.

The new camera2 API handles the rotation automatically for developers, but until they move to the new API, apps need to use the boilerplate we have in the developer docs to check the sensor and UI orientation, and apply the right rotation: http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)

We tried to work out a way to adjust the default so that apps wouldn’t have to deal with this, but unfortunately changing it would have broken apps that do call this method.

This is also why a number of apps showed upside down preview on the Nexus 6 front-facing camera last year - it’s also in the less-common orientation. But far fewer apps support the front-facing camera than the back-facing one, so it was less of an issue than it is for Nexus 5X.

So if you do see apps with upside-down camera preview on Nexus 5X, please let the developers know about this - Android’s developer relations folks are trying to reach out to apps as we find them, and LG is also helping out, but it might take a bit before everyone’s up to speed on this issue.

Hi and thanks for the explanation. This is a known issue and we are working on it. We have tried to solve it by releasing a version that is build for Android 6.0+ however we were not able to test this since we couldn’t get our hands on a Nexus 5X. It seems to be a problem related to the tracking engine we use which is Vuforia. We are now looking into a plugin to check if you’re sensor is upside down and rotate accordingly. We are in contact with a Kickstarter backer with a Nexus 5X to help us test.

That is strange, as the Vuforia + Unity combination works very well for regular AR projects on Nexus 5X.

Anyway, I’m kickstarter backer as well and have a Nexus 5X so if you need more help please tell me!

Thanks, we value your input. May I ask what build settings you have that work? It is quite difficult to fix in a proper way since we have not found a way to access the camera feed before it is used by Vuforia, or tell Vuforia the feed is rotated.

There is however an update online with a potential fix for the Nexus 5X. Could you let me know if this fixes the issue? I still hope that it’s an issue with our build settings or some other easy fix since there are more phones that have this issue and the solution we implement now requires us to know about all of the phones that have a rotated image sensor. We also translate / rotate the camera setup in Unity which is quite an ugly fix in my opinion.