Log in or register to post comments

Difference between Viewport with AR camera and stock camera

September 24, 2014 - 8:13am #1

Hi,

I was wondering, if there is any setting or bug that my AR Viewport isn't the same as if I use the stock IOS or Android camera app.

There is an extreme difference between what I see on an iPad 4 with my AR app and with the stock camera app. I can see around 4 times more on the screen when I'm using the native app, so I have to hold my device far away from my targets to recognize them. It's the same on an iPhone 5s but the difference is a bit less.

On Android on a Huawei tablet - differences as well. The only device where it looks the same is my Samsung S2.

Perhaps it has to do something with devices resolution and the bigger it is, the more the offset is, but that's just a guess.

Do you have any idea about that? Happens with Vuforia 3.0.9, Unity 4.5.4 and older versions.

Cheers and thanks

Carsten

Difference between Viewport with AR camera and stock camera

September 26, 2014 - 4:49am #6

Yes, in fact I was also referring to the iPad 4 in my previous post (not to iPad 3), and the screenshots you have attached are exactly about that issue.

Note that this issue has already been discussed in this thread:

https://developer.vuforia.com/forum/ios/sdk-version-3-0-5-retina-resolution-problem

 

Difference between Viewport with AR camera and stock camera

September 26, 2014 - 2:16am #5

Ok, thanks for your reply. I gonna try switching the camera mode. You say "slightly" zoomed, I've done two screenshots on an iPad 4 (holding on the same position), to show you the offset. We have the feeling that it's was getting worse with new Xcode 6 and Unity 4.5.4 on iOS 8. But I have to confirm that, with an older export. So is this what you are talking about:

[img]https://developer.vuforia.com/sites/default/files/IMG_0262.jpg/img]

[img]https://developer.vuforia.com/sites/default/files/IMG_0264.jpg[/img]

AttachmentSize
Image icon IMG_0262.JPG204.25 KB
Image icon IMG_0264.jpg171.9 KB

Difference between Viewport with AR camera and stock camera

September 26, 2014 - 1:22am #4

Hi, you're not doing anything wrong.

And it's not a bug;  

Vuforia takes the camera image from the camera device and then compares the camera frame dimensions and aspect ratio with the screen resolution and aspect ratio;

then it adjusts the camera image to fill the screen without any "distortion" or image deformation; since the screen has typically a different aspect ratio (width / height ratio) than the camera video frame,  in order to fill the width and height of the screen entirely, the camera image will be scaled a little big bigger (either along the width or along the height dimension) than the screen size when rendered in the ARCamera background texture.

In other words, due to the aspect ratio, if the camera image width matches the screen width, then the height will be a bit larger than the screen height (and so part of the camera image will fall out of the screen along the height direction).

Or viceversa, if the camera image height matches the screen height, then the wiidth will be a bit larger than the screen width; that is, the camera will be cropped in the horizontal direction.

Either way, this may result in a slightly "zoomed" effect. 

You could also not perform such scaling, but then you would end up with either a deformed image (if you stretch the camera image to fit the screen size in bith directions simultaneously),  or in some horizontal or vertical black bands if you try to match the width instead of the height (or vice versa).

Also, on top of tha, it could be that Vuforia is using a different camera image resolution than the one other camera apps use. And on some devices (e.g. iPad 4) we noticed that the camera image (as delivered by the device) is already slightly "zoomed" at the source (for example on iPAd 4 at 720p resolution, the camera image is only covering a sub-portion of the full camera view which is instead available at 640 x 480)

One thing you can try is to switch the camera mode from MODE_DEFAULT to MODE_OPTIMIZE_SPEED; this should result in selecting a 640 x 480 resolution with a visual result which appears less zoomed.

Hope this helps.  

Difference between Viewport with AR camera and stock camera

September 26, 2014 - 12:53am #3

Nobody? I would appreciate any solution or hint to get a viewport / fov like with the stock camera app. What I'm doing wrong?

Difference between Viewport with AR camera and stock camera

September 24, 2014 - 8:31am #2

same here. Would be great to fix that.

Best Regards

     Martin

Log in or register to post comments