Log in or register to post comments

Background camera image stretched on Droid Razr M

September 22, 2014 - 4:15pm #1

Description of the issue:

When running any of the Vuforia apps on my Droid Razr M, the background camera image appears stretched. It is most obvious is you rotate the device because it appears to stretch things along the long axis of the phone (as if a 4:3 feed was being stretched to the phone's 16:9 display), so in landscape objects will appear wider than they should, in portrait they will appear taller, and at 45 degrees they will appear skewed. Note that I'm only referring to the physical orientation of the device. The effect is the same regardless of whether the screen orientation is locked to portrait, landscape, or allowed to auto rotate. The problem only occurs for the rear camera, the front camera is fine. This happens regardless of which sample I used (Unity or Android native) and regardless of the Camera Device Mode setting. I believe I saw in other posts that there was a similar issue with the Nexus 7. Does that mean it could be fixed for my phone as well?

Exact Device Model number:

Motorola Droid Razr M (XT907)

Installed OS version:

Android 4.4.2

Vuforia SDK version

Vuforia SDK 3.0.9

Platform

Problem occurs with both all Unity (4.5) samples and Android native sample adk

Device orientation:

Problem occurs in all orientations

Back/Front Camera:

Problem only occurs with the real camera, not the front

Camera Mode:

Problem occurs in all 3 camera modes

Background camera image stretched on Droid Razr M

October 7, 2014 - 12:35pm #8

I did some testing on a Droid Razr M with Android 4.1.1 (Jelly Bean) and wasn't able to reproduce the stretching effect. I've attached a couple of screenshots along with the settings screen so you can compare. It seems that the stretching you are observing on 4.4.2 (KitKat) is a bug in the rear camera software version for that particular device. You might want to flash your device to the prior release of Android to see if the issue goes away. You could also try doing a reset of the device.

=== Related Topic: Camera Stretched on Nexus 7 with 4.4.3 ===

There was a related issue for the Nexus 7 with 4.4.3 (KitKat) where camera stretch was found to occur. The earlier 4.4.2 (KitKat) build for the Nexus 7 didn't have the issue, however. You can view that related thread here:

https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/camera-view-stretched-android

https://code.google.com/p/android/issues/detail?id=70830

Background camera image stretched on Droid Razr M

October 6, 2014 - 6:46pm #7

Can you try the following steps:

1. Disable the Internet connection on the device
2. Uninstall the sample app that you're testing with
3. Re-install the sample app
4. Run the sample app with the Internet still disabled

After these steps, is the stretching issue fixed with either MODE_OPTIMIZE_QUALITY or MODE_OPTIMIZED_SPEED?

 

Background camera image stretched on Droid Razr M

October 6, 2014 - 3:54pm #6

with the problematic rear camera I get:

MODE_DEFAULT = 1280 x 720
MODE_OPTIMIZE_SPEED = 800 x 480
MODE_OPTIMIZE_QUALITY = 1280 x 720

Background camera image stretched on Droid Razr M

October 6, 2014 - 3:05pm #5

What dimensions are you getting back from the VideoModeData/VideoMode struct for the 3 camera device modes?

VideoModeData (Unity): https://developer.vuforia.com/resources/api/unity/struct_camera_device_1_1_video_mode_data

VideoMode (iOS/Android): https://developer.vuforia.com/resources/api/struct_q_c_a_r_1_1_video_mode

MODE_DEFAULT = Width x Height
MODE_OPTIMIZE_SPEED = Width x Height
MODE_OPTIMIZE_QUALITY = Width x Height

The dimensions stored in the VideoModeData/VideoMode struct are independent of the pixel dimensions of the device.

Background camera image stretched on Droid Razr M

September 30, 2014 - 5:02pm #4

Thank you for posting the screenshots. We are looking into this.

Background camera image stretched on Droid Razr M

September 29, 2014 - 8:04am #3

As you can see in the two screenshots (sorry that one is blurry), the aspect ratio of the piece of paper appears different depending on whether you look at it in portrait or landscape. If you measure the aspect ratio and compare it to the expected aspect of an 8.5"x11" piece of paper, you'll see it is exactly what you'd expect if a 4x3 camera image is stretched to a 16x9 screen.

 

As you can see from the pictures, the screen's resolution is qHD, 960x540.

Background camera image stretched on Droid Razr M

September 25, 2014 - 8:33pm #2

Could you post a couple of screenshots (landscape & portrait) running with one of the Android sample apps? Also, can you confirm the pixel dimensions of your device?

Log in or register to post comments