Start a new topic

Autofocus compared to camera

Autofocus compared to camera

I'm testing out the wikitude for a larger production, and so far it is working great.
I have one serious issue though.
The autofocus seems bugged on some android devices. When testing the native camera app it focuses really fast, but on some devices (eg. galaxy 4s) the wikitude SDKs camera cant focus at all.

Can anything be done about this?

Hi, we are not aware of any issue with the camera autofocus function, we use the default settings of the camera in Android, but thank oyu for your feedback, I will check if we can improve that by setting the appropriate camera parameter explicitly on startup.

A better explanation:

the Android Camera has different autofocus modes, we try to get the camera into FOCUS_MODE_CONTINUOUS_VIDEO, but if that is not available, we use the default mode as a fallback. We tried with other focusing modes (e.g.: FOCUS_MODE_CONTINUOUS_PICTURE) but we found that FOCUS_MODE_CONTINUOUS_VIDEO gives the best result.

I could not test with a Samsung Galaxy S4 (only with S3 and S5), but I now I'm trying to use FOCUS_MODE_AUTO before the default fallback. This change will be in the next version of the SDK, in the 4.1 or 5.0 series after proper internal testing. Please let me know if you see any improvement when this version is out.

Thank you.  That corresponds to what I'm experiencing.
On the camera app the focus happns once and then stays focused. On thewikitudeapp it seems to continously trying to refocus (thus triggering the target every time focis is gained).

Is there any way you can add the option to select focus method ourself?

When is the next version due?

Hello again.

Do you have any comments on the post above.
Right now we're in the phase of selecting our future tools for AR and the focus is really a big issue for us.


Currently there is no way to set the autofocus mode externally, we are working on that feature for the new version. I've tested some different approach, but we cannot simply change the default behaviour, there are a couple of drawbacks with that: most users are Ok with the current camera implementation, and if the mode is set to FOCUS_MODE_AUTO the application should trigger the auto-focus function explicitly which is not ideal.

I still don't know when the new version will be out, we just released version 4.0.3 for Android 5.0 compatibility, and this is expected to be the last one in the 4.0 series, so the next one should contain all the camera improvements, (not only auto-focus).

Don't you have any pointers when you expect the next version to be available Q1-Q4 2015 or something like that?


This should be available in Q1. We'll inform you once it's ready.



Hi Henrik,

Our new SDK version, which allowes you to control the camera focus is released. You can download the lasted SDK 4.1. here. Details on the hardware control can be found here



Is this an Android-only feature? Or does it also exist on iOS?

It is mentioned in the release notes for Android but I cannot find any mention of it in the iOS  release notes.

BTW: It seems like your link to the "Details on the hardware control" is missing.

Kind regards,

Hi Nill,

the feature is available for both platforms. There is a hardware sample with explanation available in our documentation. The detailed API specifications can be found in our JavaScript API Reference.

This is great..
I'm trying it out now, and offcourse thre are some changes to the API..  That is to be expected but I can' get it to accept the key I've allready bought:

Now the old app I've made is based on your old xamarin example ant I enter the key like this :
var config = new ArchitectView.ArchitectConfig(Constants.WIKITUDE_SDK_KEY);

This works fine..

Now in the new version it looks like i have to do this:
var config = new StartupConfigutation(Constants.WIKITUDE_SDK_KEY, StrtupConfiguraton.Features.Tracking2D);

It accepts, compils ad runs the codeon my test-hardware BUT it doesn't accept the same key.

Am I doing this wrong?

Hi Janne,

what does the camera view say in detail?



Hi Philipp.

by closer examination, the problem seemed to originate elsewhere..
I'll create a seperate thread on that issue.
Login or Signup to post a comment