Log in or register to post comments

Vuforia-Camera center shift on some devices

March 19, 2019 - 7:52am #1

Vuforia SDK Version: 8.0.10 -

Description with steps to reproduce: I've probably found a Vuforia bug I'd like to report:

Galaxy S9 Android 9
SDK 8.0.10
Unity 2018.2.13f1

On my Android build on a Galaxy S9 G960F, the Vuforia Camera has a displacement of the image center. This can be easily reproduced as follows:

* Create a new scene

* Add the ARCamera from Vuforia to the scene

* Add Sphere as child node on the camera

* Move the sphere only on the Z axis to 5 (or similar)

* Canvas in the scene

* Create a picture on the canvas (magenta quadratic)

* Picture on 20x20 pixels (or similar)

* Anchor image directly in the center on the canvas

The expectation of this scene is that the UI image, which is shown in the screen center is located directly in the center of the rendered sphere in 3D space. That's not the case. Here is an offset of the 3d objects recognizable. Only the UI is in the center of the screen. The 3D Objects are shifted away from screen center.

Solution (hacky): If you switch the camera component which is asigned on ARCamera to orthographic at runtime and then back shortly afterwards, the scene will match the expected result.

I can only assume that this is a bug.

Would be glad about help or an answer. Thank you. -

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

Mobile OS and Version: Android 9 -

Mobile Device Manufacturer and Model name: Samsung Galaxy S9 -

Do the Vuforia Sample Applications show the same behavior?:

Vuforia-Camera center shift on some devices

April 16, 2019 - 7:32am #8

Vuforia Version 7.1.31

Galaxy S7 Android 8

 

I'm having a different problem, it's with the canvas.

Every time a generate an APK, it offsets the canvas - I added the screenshot - I've created a project with only the AR camera and a full-screen white canvas.

When I run the APK at the Galaxy S8 (and some specific models) all the canvas shift some pixels.

I've tried a lot, but I still can't understand where is the problem or how to fix it, It happens every time, even with more complex projects.

many thanks.

 

 

AttachmentSize
Image icon uniy-screenshot.jpg343.21 KB
Image icon apk-S7screenshot.jpg164.43 KB

Vuforia-Camera center shift on some devices

March 29, 2019 - 4:10pm #7

Hello,

If you can provide a repo project with instructions on how to replicate the issue, then I can escalate to the engineering team for further review.

Thanks,

Vuforia Engine Support

Vuforia-Camera center shift on some devices

March 27, 2019 - 1:22am #6

Many thanks for your response.



We have been working with vuforia for a few years and yes, we need a certain accuracy of tracking. That has always worked very well so far. The accuracy is still present on many devices.

We do not do any special or absract things, but we just need a small offset of the trackable.

And the offset does not result from an inaccuracy of the tracking, but just by an inaccuracy of the projection matrix (and possibly other internal things that I can not analyze).

And maybe this has not been clear until now, but this error is definitely to be found on all Samsung S8 and S9, which want to use a Unity App with Vuforia. This is not a special usage problem! And maybe there are even more devices which we have not tested yet.

I can also give more examples, create a project, or build APKs if that helps, but the mistake does not seem to be a calibration or tracking problem.

Would it be possible for a developer to address this problem internally? I would also prepare everything necessary there.

Many Thanks

Vuforia-Camera center shift on some devices

March 26, 2019 - 8:22am #5

Hello,

The camera resolution that Vuforia uses is unlikely to be wrong as the device advertises supported resolutions, and Vuforia picks one of those.

Looks like you're trying to drive some high-tolerance experiences. Note that no two cameras have the same intrinsic principal point of focal length, and Vuforia uses estimated intrinsic calibration values since it is not possible to calibrate every device at each camera resolution. I'm wondering if this explains the discrepancy you're seeing.

Thanks,

Vuforia Engine Support

Vuforia-Camera center shift on some devices

March 21, 2019 - 2:02pm #4

Maybe i found the reason for the shift: the projection matrix of the vuforia arcamera is maybe wrong, because the aspect ratio which is used in the matrix is 2.059594. but the aspect ratio with screen.width / screen.height results on the Samsung S9 to 2.055556. Resetting or Recalculating the matrix fixes this bug, but nerverless after this fix the resulting tracking seems to be shifted in depth. I think that propably vuforia uses on this devices a wrong resolution? fixing the projectionmatrix cannot fix the complete problem!?

Vuforia-Camera center shift on some devices

March 21, 2019 - 11:51am #3

Yes I know that. this is just the minimal example to reproduce the bug or misbehaviuor. there must be no tracking or other vuforia feature active. only the first initializing and the camera is started.

the sphere placed under the camera ensures that it is always rendered in the center of the resulting image. 

The bug can also be forced differently, but this is the simplest and most comprehensible scene to get the resulting error.

I add screenshots from editor and the s9 too. there the offset can be clearly recognized.

 

thank you.

 

 

 

AttachmentSize
Image icon Screenshot_20190321-194734.jpg1.65 MB
Image icon editor.png841.77 KB

Vuforia-Camera center shift on some devices

March 21, 2019 - 4:28am #2

Hello,

mjantowski wrote:

On my Android build on a Galaxy S9 G960F, the Vuforia Camera has a displacement of the image center. This can be easily reproduced as follows:

* Create a new scene

* Add the ARCamera from Vuforia to the scene

* Add Sphere as child node on the camera

This is not the correct project heirarchy. A game object for one of Vuforia's features needs to be added to the scene heirarchy at the same level as the ARCamera. You would then add the sphere as a child node to that game object.

If this doesn't make sense, please refer to the Vuforia Core samples on the Unity Asset Store for best practices.

Thanks,

Vuforia Engine Support

Log in or register to post comments