Log in or register to post comments

Customize camera preview size?

August 12, 2012 - 1:23am #1

Hi all,

Vuforia is really great. It works on almost every Android device.

But on some of my targeted Android devices, Vuforia just freezes at starting up the camera. I guess changing the preview size would solve the problem. Setting video mode to OPTIMIZE does not help.

The reason why I think about changing the camera preview size is because when I start the Camera application, I can see the resolution of the preview is very low.

If not possible for now, I suggest adding API calls to forcefully set camera preview size and FPS.

Thanks,

 

Customize camera preview size?

August 29, 2012 - 10:06am #7

Thanks for your reply.

Yes, I tried my Vuforia app with Internet Connection available. I use camera mode OPTIMIZE already, but the supposedly working resolution is even lower. What I did was to divide the resolution by 2, but this is very ugly, so I believe there should have been a better number that I did not try.

I will give you the needed information when I have time and access to the device again (I am working for a company with a devices storehouse but I cannot access them anytime I want).

However, this is not the only device with such problems. There are some other Samsung Galaxy S2 products suffering from this as well.

My humble suggestion is that Vuforia can add API to customize camera preview size, or add more camera mode option to further optimize it (currently you have three modes but all of them are not working on these troublesome devices).

 

Customize camera preview size?

August 27, 2012 - 2:46pm #6

Hello,

Thanks for helping to debug this issue. Can you tell me what resolution you see working?

Are you running the Vuforia app with an active network connection. The device should be using 800 x 600 when it gets the settings from the server.  I know running Froyo this was the lowest supported resolution of the device. Since you are runnning Gingerbread there may have been some changes to the supported camera resolutions. Can you tell me the available supported resolutions? This can be found a number of ways, one of which is by running a program called Device Info on device and looking up the camera -> image -> supported resolutions field. 

Thank you,

-Peter

Customize camera preview size?

August 26, 2012 - 8:33pm #5

Sorry for my quite late reply.

The Android OS version is 2.3.4, and Vuforia SDK version is 1.5.9 (the the latest I can download here).

Of course, I tried all SDK samples including ImageTargets, but none was working.

I will be honest in order to make things easier for you.

I illegally decompile the JAR source code and hack the camera preview size to smaller size and it will not freeze (but Vuforia will not track that preview image). That was why I asked for a custom preview size instruction in the SDK.

Customize camera preview size?

August 20, 2012 - 11:42am #4

What Android OS does your device have and what version of the Vuforia SDK do you have? Can you tell me if the ImageTargets sample app shows the same behavior on your device?

Thank you,

-Peter

Customize camera preview size?

August 16, 2012 - 6:46am #3

Thanks for replying.

I am sorry for not being clear. The device I mentioned is Samsung Galaxy P1010.

My app freezes whenever I start camera. If I remove those line, the app will not freeze but of course, no AR.

So, these lines caused the freeze. The app does not crash but just freeze there, waiting for me to force stop it.

 

                // Initialize the camera:

if (!QCAR::CameraDevice::getInstance().init())

return;    

// Select the default mode:

if (!QCAR::CameraDevice::getInstance().selectVideoMode(  QCAR::CameraDevice::MODE_DEFAULT) )

{

return;

}

 

// Start the camera:

if( !QCAR::CameraDevice::getInstance().start() )

{

return;

}

Customize camera preview size?

August 14, 2012 - 9:11am #2

Hello,

Can you tell me the model names of the devices you are seeing freezes on?

Thank you,

-Peter

Log in or register to post comments