- Camera Focus Modes
- How To Obtain HD Camera Frames
- How To Access the Camera Image in Unity
- How To Access the Camera Image in Native
- How To Use the Camera Projection Matrix
- How To Access Camera Parameters
- How To Determine Camera Pose
- How To Determine Target Distance
Continuous Autofocus and Other Focus Modes
This article describes the different focus modes available in Vuforia Engine (since v1.5 and above).
The behavior of the focus modes in Vuforia Engine (since v1.5) is described below:
||Sets the camera into the default mode as defined by the camera driver.|
||Triggers a single autofocus operation.|
||Lets you turn on driver-level continuous autofocus for cameras. This mode is optimal for AR applications. This mode yields the best tracking results because it guarantees that the camera is focused on the target. (starts in Android 2.3 and iOS devices)|
||Sets the camera to infinity, as provided by the camera driver implementation. (not supported on iOS)|
||Sets the camera to macro mode, as provided by the camera driver implementation. This mode provides a sharp camera image for distances of closeups (approximately 15 cm), rarely used in AR setups. (not supported on iOS)|
We encourage using
FOCUS_MODE_CONTINUOUSAUTO in your applications whenever it is available on the device. When setting this mode, if the return value of setFocusMode() is TRUE your application will provide sharp camera images for both superior rendering, as well as for robust tracking performance.
FOCUS_MODE_CONTINUOUSAUTO is not available, the next best option is to implement a 'touch to focus' behavior in your app. To do this,
trigger setFocusMode() with
FOCUS_MODE_TRIGGERAUTO value each time the user touches the screen. The disadvantage of this behavior is that most camera drivers pick a random direction to focus (near or far), so you have a 50% chance that the image will defocus and then focus on the target. Under certain conditions due this focus logic the tracking can be lost for a moment until a sharp image is provided again by the camera.
FOCUS_MODE_MACRO are usable in certain application scenarios, as described above.
FOCUS_MODE_NORMAL sets the camera into the default mode as defined by the camera driver.