Topic has a solution and is locked
Log in or register to post comments

Autofocus

March 3, 2019 - 3:16am #1
Topic solved

Hi i came across a problem I do not really understand.

I used the Vuforia api to activate Autofocus in my Project like so:

void Start()

{

CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);

}

(I checked, and the script is actually called)

This however did not make the Samsung S8 i was testing on focus continously like expected instead it stayed unfocused (probably focused at infinity).

When I moved this setting into an Update function it actually made the S8 Autofocus. The Autofocus of a different Android Phone (Huawei P20) did not respond to the workaround but had the same problem of not autofocusing the usual way. Testing on a S7 the Autofocus worked as expected (one call on Start() was sufficient).

Since most Vuforia features stop working with an unfocused camera this seems like a major issue.

Any ideas on how to resolve this in a satisfactory way?

Patrick

Autofocus

December 20, 2021 - 10:23am #3

[Vuforia Engine v10+]

There are two articles that help with setting up autofocus for Vuforia Engine.

 

Unity:

https://library.vuforia.com/platform-support/working-camera-unity

Native:

https://library.vuforia.com/platform-support/working-camera-native

 

Kind regards,

Patrick Scheper

Technical Community Manager

Autofocus

March 6, 2019 - 12:19pm #2

Hello,

Reviewing our Core samples code, I don't see where we've needed to do anything different to support changing focus modes based upon the device model. Check Assets/Common/Scripts/CameraSettings.cs for our solution.

Additionally, I also tested our 8.0.10 Unity Core sample on an S8 to confirm that continuous autofocus is actually working, which was confirmed in this video: https://www.dropbox.com/s/w31y0tqddb2p4r6/S8_autofocus_working.mp4?dl=0. I also confirmed that behavior was the same with and without ARCore being installed (as some older versions of ARCore do not support continous autofocus).

Lastly, the functioning of focus modes on a device is solely based upon the OEM's implementation. Vuforia *does not* have its own implementation, so our APIs call native OS APIs.

Thanks,

Vuforia Engine Support

Log in or register to post comments