Topic locked

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 9, 2014 - 8:23am #1

Hi there.

 

It seems that FOCUS_MODE_CONTINUOUSAUTO is not working in any Android device where I test the app, not in Asus MeMO Pad 10, not in a Samsung Galaxy S5, not in any device :P

 

THe trigger is working without a problem, but the auto is not triggered, it happend since I upgraded to Vuforia 3, I have not tested with iOS, it was working before, but now with VUforia 3 I'm not sure.

Any ideas ? I'm a bit in a hurry because I have to publish the app, is for a client.

 

Cheers.

FOCUS_MODE_CONTINUOUSAUTO not working on Android

January 5, 2015 - 11:53pm #19

Closing thread.

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 14, 2014 - 6:42am #18

Hi again,

we have made a few tests, but we were unable to observe any significant difference in autofocus performance (speed) between 2.8 and 3.0 (note: tests have been done using same scene and same room / lighting conditions with both versions of the SDK).

provided that this issue is still relevant for you, would it be possible for you to produce a comparative Video that shows evidence of the different autofocus speed between 2.8 and 3.0 ? (using a minimal setup such as an empty scene with ARCamera, or using one of our samples) ?   That would help.

 

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 8:47am #17

Ok, so it works, but it appears to be slower in 3.0.

I will report this to my team, although I am not sure there is so much we can do if this is the case; one hypothesis is that the CPU workload might have slightly increased and this might (potentially) have an impact on the autofocus reaction speed..

I will update if I get more details on this from my team.

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 8:33am #16

Hi Alessandro.

 

I just tested it again taking into account the speed thing you mentioned, Autofocus is working in the test project and in my big project, the problem is the speed, it's a lot slower than 2.8, so it feels like it is not focusing, but if you are patient enough and move the device a bit it focus again.

So the problem could be the speed, not that the autofocus is not completely working, in the test apps, the autofocus was a lot faster in the 2.8 than in the 3.0, and in my app it finally works, but it lasts a bit until it can focus.

 

Cheers and thanks again!

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 8:30am #15

Ok, thanks for confirming. 

I am going to look at this with the team, using your specific devices as you reported them, as it might have something to do with those devices in particular (for example, we cannot reproduce this at the moment on a Samsung Galaxy S3, just as an example).

I will update you as soon as I have some more news.

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 8:11am #14

In 2.8 autofocus is working. :S

 

Cheers.

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 8:03am #13

I'll do the test.

 

I had to migrate to 3.0 because I was having problems in Android with the background, I received a white background or a blank background, when I upgraded to 3.0, everything was great.

 

Let me check the same sample project with 2.8, I'll report quickly.

 

Cheers!

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 8:01am #12

Thanks, have you also checked if this is working on Vuforia 2.8 ?

While testing this, I noticed that the Continuous autofocus can react a little it quicker or slower depending on the device;

- on some devices it is very quick in realizing the view change and adapting the focus,

- on other devices it takes a little bit more time, and sometime it just does not get the right focus that you would expect:   for example if the camera is too close to the target, it might get stuck in some  out-of-focus state (=> blurry image) until you move the device a bit (or until you press the button again)

- the performance I observed also vary with different lighting conditions (certain devices react quicker in bright environments and have more difficulties to adjust the focus in low lighting)

- however, I compared the results of Vuforia 2.8 and Vuforia 3.0, and I did not really observe any difference; to me this looks like something that depends on the actual autofocus capabilities of the device.

 

Do you have evidence that in Vuforia 2.8 things were running better than in 3.0 ? 

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 7:52am #11

Hi Alessandro.

 

That is not my app, it's a new unity project with just vuforia imported, a new scene with an ARCamera prefab, and that's it.

 

Nothing from my project :)

 

Your code is the code I use, but I didn't include it in that project, let me include it, compile and check if it works, if not I'll reupload the project, I insist, it's 20mb project, nothing from a real project, clean new empty project wiht a camera and that's it :)

 

Cheers.

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 7:47am #10

Hi there again.

 

I tried it and you can see the result in the attached picture.

The autofocus is correctly engaged, but it's not working, as you can see the keyboard is out of focus and my device is capable of focus it.

Do you want me to upload the project? You can reproduce the project itself, just new project, completely empty, import vuforia, put a camera, put a sphere, no need for any other thing, put the script you gave me (I added a GUI.Label to check the result in the device), and compile it... it's not working for me :P That's why I say if you want my project, so you can check if there is something wrong with my project itself (not my entire project, but the one I just described),

 

Cheers and thanks!

 

 

AttachmentSize
Image icon autofocus.jpg410.54 KB

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 6:58am #9

No, sorry, I am not going to debug your full application (and also, could you avoid sharing the full source of a project on the Forum please ??? ... I am not even sure it is legally allowed).

What we need is a simple and minimal repro-case;   if you cannot provide one, I can provide one for you, i.e.:

  • create a simple scene with an ARCamera (and optionally one Image Target or a Frame Marker, but this is not really needed)
  • create a C# script and attach it to the ARCamera (or to another game object in your scene)
  • put  these lines in the script to test the autofocus:
void OnGUI() { 
  if (GUI.Button(new Rect(50,50,200,50), "Cont. AutoFocus")) {
    if (CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO)) {
      Debug.Log( "Continuous AutoFocus successfully set" );             
    } 
    else { 
      Debug.Log( "Failed to set continuous autofocus" ); 
    } 
}
  • verify that the autofocus Log message confirms that the Autofocus was set successfully (if not, this means that the device does not support it)
  • verify visually if the autofocus is actually working (or not working) by zooming in on a target object

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 6:35am #8

I'll do something better.

 

I've just created a completely new projet, imported vuforia 3.0.6, compiled it, and autofocus is not working either, so I'll post here a link to the project itself.

 

************ REMOVED LINK ********************

 

When I compile that project as is, autofocus is not working :P

 

Cheers.

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 6:24am #7

Just send me the few lines of code of your test script via PM .

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 5:57am #6

Hi.

 

Thanks for testing, I tried creating a simple scene inside my app, and compile just that scene, the problem is exactly the same.

 

Where can I send you the apk (a link so you can download it)? I can't do it public, but I can send it to you, in my sample app I put foru buttons to change the focus mode, and you can clearly see that the autofocus is not working.

The current tablet I'm using right now is an Asus MeMO Pad 10 ME301T, Android 4.2.1, Camera: ME301T-090027

I don't have the data of the other devices (they are from my client) but I know there is a Samsung Galaxy S5 and two Galaxy note 10.1

 

Cheers and thanks again!

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 5:52am #5

I'm using Unity 4.5 and Vuforia 3.0.6, and the autofocus mode is not working in any android device.

I'm also using the same, and I tried on 2 different devices, and autofocus seems to work fine.

Could you run the samples and verify if you can reproduce the same issue ? and if so, could you provide the exact Model Device Number and Android OS version installed for each of the device where you can reproduce this issue ?

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 3:23am #4

Hi,

can you reproduce this with any of the Vuforia samples ? 

I'm also going to run a quick test in the meantime...

 

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 10, 2014 - 3:06am #3

Really guys, nothing there?

 

I'm using Unity 4.5 and Vuforia 3.0.6, and the autofocus mode is not working in any android device.

 

Any Vuforia developer can tell something about this? I can send a sample APK via some private message, but I need to solve this ASAP :S

 

Cheers and thanks!

FOCUS_MODE_CONTINUOUSAUTO not working on Android

July 9, 2014 - 2:54pm #2

No ideas on why is this happening?

Cheers

Topic locked